Skip to content

Commit

Permalink
feat: Add new containerProbe type exec for command execution (#114)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Meier <[email protected]>
  • Loading branch information
astromechza authored Jan 9, 2025
1 parent 45d149e commit ef1ed10
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
5 changes: 5 additions & 0 deletions samples/score-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ containers:
httpGet:
port: 8080
path: /livez
exec:
command:
- /bin/curl
- -f
- "http://localhost:8080/livez"
readinessProbe:
httpGet:
host: 127.0.0.1
Expand Down
22 changes: 19 additions & 3 deletions score-v1b1.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,29 @@
},
"containerProbe": {
"type": "object",
"required": [
"httpGet"
],
"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.",
"additionalProperties": false,
"properties": {
"httpGet": {
"$ref": "#/$defs/httpProbe"
},
"exec": {
"$ref": "#/$defs/execProbe"
}
}
},
"execProbe": {
"description": "An executable health probe.",
"type": "object",
"additionalProperties": false,
"required": ["command"],
"properties": {
"command": {
"description": "The command and arguments to execute within the container.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down

0 comments on commit ef1ed10

Please sign in to comment.