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`:
|
||||
|
||||
{{% 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
|
||||
|
|
|
@ -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
|
||||
- |
|
Loading…
Reference in New Issue