KEP-3998: Clarify the example
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>pull/45135/head
parent
fcdb477aa4
commit
d79de0290a
|
@ -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`:
|
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
|
In the example above, the rule of the success policy specifies that
|
||||||
the Job should be marked succeeded and terminate the lingering Pods
|
the Job should be marked succeeded and terminate the lingering Pods
|
||||||
|
|
|
@ -3,7 +3,7 @@ kind: Job
|
||||||
spec:
|
spec:
|
||||||
parallelism: 10
|
parallelism: 10
|
||||||
completions: 10
|
completions: 10
|
||||||
completionMode: Indexed # Required for the feature
|
completionMode: Indexed # Required for the success policy
|
||||||
successPolicy:
|
successPolicy:
|
||||||
rules:
|
rules:
|
||||||
- succeededIndexes: 0,2-3
|
- succeededIndexes: 0,2-3
|
||||||
|
@ -13,8 +13,8 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: main
|
- name: main
|
||||||
image: python
|
image: python
|
||||||
command: # The jobs succeed as there is one succeeded index
|
command: # Provided that at least one of the Pods with 0, 2, and 3 indexes has succeeded,
|
||||||
# among indexes 0, 2, and 3.
|
# the overall Job is a success.
|
||||||
- python3
|
- python3
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
Loading…
Reference in New Issue