Created
July 12, 2024 15:55
-
-
Save deads2k/d3d21c463701296082edfbdbd323ff37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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