diff --git a/content/en/docs/concepts/workloads/controllers/job.md b/content/en/docs/concepts/workloads/controllers/job.md index 4175329eae..cfb9a0c0bd 100644 --- a/content/en/docs/concepts/workloads/controllers/job.md +++ b/content/en/docs/concepts/workloads/controllers/job.md @@ -590,7 +590,7 @@ the rules are evaluated in order. Once the Job meets a rule, the remaining rules Here is a manifest for a Job with `successPolicy`: -{{% code_sample file="/controllers/job-success-policy-example.yaml" %}} +{{% code_sample file="/controllers/job-success-policy.yaml" %}} In the example above, the rule of the success policy specifies that the Job should be marked succeeded and terminate the lingering Pods diff --git a/content/en/examples/controllers/job-success-policy-example.yaml b/content/en/examples/controllers/job-success-policy.yaml similarity index 66% rename from content/en/examples/controllers/job-success-policy-example.yaml rename to content/en/examples/controllers/job-success-policy.yaml index f82115fe28..1f7927b2f3 100644 --- a/content/en/examples/controllers/job-success-policy-example.yaml +++ b/content/en/examples/controllers/job-success-policy.yaml @@ -3,7 +3,7 @@ kind: Job spec: parallelism: 10 completions: 10 - completionMode: Indexed # Required for the feature + completionMode: Indexed # Required for the success policy successPolicy: rules: - succeededIndexes: 0,2-3 @@ -13,8 +13,8 @@ spec: containers: - name: main image: python - command: # The jobs succeed as there is one succeeded index - # among indexes 0, 2, and 3. + command: # Provided that at least one of the Pods with 0, 2, and 3 indexes has succeeded, + # the overall Job is a success. - python3 - -c - |