Skip to content

Commit ef1ed10

Browse files
authored
feat: Add new containerProbe type exec for command execution (#114)
Signed-off-by: Ben Meier <ben.meier@humanitec.com>
1 parent 45d149e commit ef1ed10

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

samples/score-full.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ containers:
4545
httpGet:
4646
port: 8080
4747
path: /livez
48+
exec:
49+
command:
50+
- /bin/curl
51+
- -f
52+
- "http://localhost:8080/livez"
4853
readinessProbe:
4954
httpGet:
5055
host: 127.0.0.1

score-v1b1.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,29 @@
338338
},
339339
"containerProbe": {
340340
"type": "object",
341-
"required": [
342-
"httpGet"
343-
],
341+
"description": "The probe may be defined as either http, command execution, or both. The execProbe should be preferred if the Score implementation supports both types.",
344342
"additionalProperties": false,
345343
"properties": {
346344
"httpGet": {
347345
"$ref": "#/$defs/httpProbe"
346+
},
347+
"exec": {
348+
"$ref": "#/$defs/execProbe"
349+
}
350+
}
351+
},
352+
"execProbe": {
353+
"description": "An executable health probe.",
354+
"type": "object",
355+
"additionalProperties": false,
356+
"required": ["command"],
357+
"properties": {
358+
"command": {
359+
"description": "The command and arguments to execute within the container.",
360+
"type": "array",
361+
"items": {
362+
"type": "string"
363+
}
348364
}
349365
}
350366
},

0 commit comments

Comments
 (0)