You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moreover, we validate the following constraints for the `rules` and `status.conditions`:
@@ -341,8 +358,8 @@ Every time the pod condition are updated, the job-controller evaluates the succe
341
358
-`succeededIndexes`: the job-controller evaluates `.status.completedIndexes` to see if a set of indexes is there.
342
359
-`succeededCount`: the job-controller evaluates `.status.succeeded` to see if the value is `succeededCount` or more.
343
360
344
-
After that, the job-controller adds a `SuccessCriteriaMet` condition instead of a `Failed` condition to `.status.conditions`
345
-
and the job-controller terminates the lingering pods. At that time, `JobSuccessPolicy` is set to the `status.reason` field.
361
+
After that, the job-controller adds a `SuccessCriteriaMet` condition instead of a `FailureTarget` condition to `.status.conditions`
362
+
and the job-controller terminates the lingering pods. At that time, `SuccessPolicy` is set to the `status.reason` field.
346
363
347
364
Note that when the job meets one of successPolicies, other successPolicies are ignored.
348
365
@@ -431,9 +448,9 @@ to implement this enhancement.
431
448
##### e2e tests
432
449
433
450
- Test scenarios:
434
-
- handling of successPolicy when all indexes succeeded
435
-
- handling of the `.spec.successPolicy.rules.succeededIndexes` when some indexes remain pending
436
-
- handling of the `.spec.successPolicy.rules.succeededCount` when some indexes remain pending
451
+
-[handling of successPolicy when all indexes succeeded](https://github.com/kubernetes/kubernetes/blob/3a8a60eba29940e26ac8db52329a91ba87305114/test/e2e/apps/job.go#L524-L530)
452
+
-[handling of the `.spec.successPolicy.rules.succeededIndexes` when some indexes remain pending](https://github.com/kubernetes/kubernetes/blob/3a8a60eba29940e26ac8db52329a91ba87305114/test/e2e/apps/job.go#L563-L569)
453
+
-[handling of the `.spec.successPolicy.rules.succeededCount` when some indexes remain pending](https://github.com/kubernetes/kubernetes/blob/3a8a60eba29940e26ac8db52329a91ba87305114/test/e2e/apps/job.go#L602-L608)
437
454
438
455
### Graduation Criteria
439
456
@@ -445,7 +462,8 @@ to implement this enhancement.
445
462
#### Beta
446
463
447
464
- E2E tests passed as designed in [TestPlan](#test-plan).
448
-
- Introduced a new `job_succeeded_total` metric in [Monitoring Requirements](#monitoring-requirements).
465
+
- Introduced new `CompletionsReached` and `SuccessPolicy` reason labels to the `jobs_finished_total` metric in [Monitoring Requirements](#monitoring-requirements).
466
+
- Introduced a new `CompletionsReached` condition reason for the `Complete` and `SuccessCriteriaMet` condition type.
449
467
- Feature is enabled by default.
450
468
- Address all issues reported by users.
451
469
@@ -616,16 +634,19 @@ No.
616
634
617
635
###### How can an operator determine if the feature is in use by workloads?
618
636
619
-
We will introduce the new `job_succeeded_total` metric with `JobSuccessPolicy` and `Completions` reasons,
620
-
which indicates the following situations:
637
+
We will introduce the new `CompletionsReached` and `SuccessPolicy` reason labels to the `jobs_finished_total`,
638
+
which indicates the following situations:
639
+
640
+
- `CompletionsReached`indicates a job is declared as `Complete` because the number of succeeded job pods meet `.spec.completions`.
641
+
- `SuccessPolicy`indicates a job is declared as `Complete` because the job meets `.spec.successPolicy`.
621
642
622
-
- `JobSuccessPolicy`indicates a job is declared as `SuccessCriteriaMet` because the job meets `spec.succesPolicy`.
623
-
- `Completions`indicates a job is declared as `SuccessCriteriaMet` because the job meets `spec.completions`.
643
+
As we discussed in [this thread](https://github.com/kubernetes/kubernetes/pull/126075#discussion_r1677411216),
644
+
the new `CompletionsReached` reason label is used to count the successful jobs instead of existing "" reason label.
624
645
625
646
###### How can someone using this feature know that it is working for their instance?
626
647
627
648
- [x] Job API .status
628
-
- The Job controller will add a condition with `JobSuccessPolicy` reason to `conditions`.
649
+
- The Job controller will add a `SuccessCriteriaMet` condition with `SuccessPolicy` reason to `conditions`.
629
650
630
651
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
631
652
@@ -719,6 +740,7 @@ consider tuning the parameters for [APF](https://kubernetes.io/docs/concepts/clu
719
740
- 2024.02.07: API is finalized for the alpha stage.
720
741
- 2024.03.09: "Criteria"is replaced with "Rules".
721
742
- 2024.06.11: Beta Graduation.
743
+
- 2024.07.26: "CompletionsReached"reason is added and new reason labels are added to the "jobs_finished_total" metric.
0 commit comments