KEP-3998: Clarify the example

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
pull/45135/head
Yuki Iwai 2024-03-26 02:41:36 +09:00
parent fcdb477aa4
commit d79de0290a
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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
- |