Skip to content

Commit d79de02

Browse files
committed
KEP-3998: Clarify the example
Signed-off-by: Yuki Iwai <[email protected]>
1 parent fcdb477 commit d79de02

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

content/en/docs/concepts/workloads/controllers/job.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ the rules are evaluated in order. Once the Job meets a rule, the remaining rules
590590

591591
Here is a manifest for a Job with `successPolicy`:
592592

593-
{{% code_sample file="/controllers/job-success-policy-example.yaml" %}}
593+
{{% code_sample file="/controllers/job-success-policy.yaml" %}}
594594

595595
In the example above, the rule of the success policy specifies that
596596
the Job should be marked succeeded and terminate the lingering Pods

content/en/examples/controllers/job-success-policy-example.yaml renamed to content/en/examples/controllers/job-success-policy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Job
33
spec:
44
parallelism: 10
55
completions: 10
6-
completionMode: Indexed # Required for the feature
6+
completionMode: Indexed # Required for the success policy
77
successPolicy:
88
rules:
99
- succeededIndexes: 0,2-3
@@ -13,8 +13,8 @@ spec:
1313
containers:
1414
- name: main
1515
image: python
16-
command: # The jobs succeed as there is one succeeded index
17-
# among indexes 0, 2, and 3.
16+
command: # Provided that at least one of the Pods with 0, 2, and 3 indexes has succeeded,
17+
# the overall Job is a success.
1818
- python3
1919
- -c
2020
- |

0 commit comments

Comments
 (0)