Skip to content

Instantly share code, notes, and snippets.

@deads2k
Created July 12, 2024 15:55
Show Gist options
  • Save deads2k/d3d21c463701296082edfbdbd323ff37 to your computer and use it in GitHub Desktop.
Save deads2k/d3d21c463701296082edfbdbd323ff37 to your computer and use it in GitHub Desktop.
{
"apiVersion": "jobset.x-k8s.io/v1alpha2",
"kind": "JobSet",
"metadata": {
"name": "failurepolicy-abcdef",
"creationTimestamp": null
},
"spec": {
"replicatedJobs": [
{
"name": "leader",
"replicas": 1,
"template": {
"spec": {
"backoffLimit": 0,
"completions": 2,
"parallelism": 2,
"template": {
"spec": {
"restartPolicy": "Never",
"containers": [
{
"name": "leader",
"image": "bash:latest",
"command": [
"bash",
"-xc",
"for i in $(seq 1 1000)\ndo\n echo \"$i\"\n sleep 1\ndone\n"
],
"resources": {}
}
]
},
"metadata": {
"creationTimestamp": null
}
},
"podFailurePolicy": {
"rules": [
{
"action": "FailJob",
"onPodConditions": [
{
"type": "DisruptionTarget",
"status": ""
}
],
"onExitCodes": null
},
{
"action": "Ignore",
"onExitCodes": {
"operator": "In",
"values": [
42
],
"containerName": null
},
"onPodConditions": null
}
]
},
"completionMode": "Indexed"
},
"metadata": {
"creationTimestamp": null
}
}
}
],
"network": {
"enableDNSHostnames": true
},
"successPolicy": {
"operator": "All"
},
"startupPolicy": {
"startupPolicyOrder": "AnyOrder"
}
},
"status": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment