Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KEP 262: Configurable Failure Policy API #381

Merged
merged 16 commits into from
Feb 10, 2024
Merged
Prev Previous commit
Next Next commit
update future work story 2
  • Loading branch information
danielvegamyhre committed Feb 9, 2024
commit 638833002ad63f4bddcac76a3686e17fb9bf4172
19 changes: 3 additions & 16 deletions keps/262-ConfigurableFailurePolicy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,19 +576,12 @@ metadata:
spec:
failurePolicy:
rules:
# If Job fails due to a pod failing with exit code 2, leave it in a failed state.
- action: FailJob
targetReplicatedJobs:
- simulations
onJobFailureReasons:
- ExitCode2
# If Job fails due to a pod failing with exit code 3, restart that Job.
- action: RestartJob
targetReplicatedJobs:
- simulations
onJobFailureReasons:
- ExitCode3
maxRestarts: 10
# Catch all rule to leave a failed job in the failed state, if it hasn't matched previous rules.
- action: FailJob
replicatedJobs:
- name: simulations
replicas: 10
Expand All @@ -597,15 +590,9 @@ spec:
parallelism: 1
completions: 1
backoffLimit: 0
# If a pod fails with exit code 2 or 3, fail the Job, using the user-defined reason.
# If a pod fails with exit code 3, fail the Job, using the user-defined reason.
podFailurePolicy:
rules:
- action: FailJob
onExitCodes:
containerName: main
operator: In
values: [2]
setConditionReason: "ExitCode2"
- action: FailJob
onExitCodes:
containerName: main
Expand Down