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
@@ -614,16 +632,19 @@ No.
614
632
615
633
###### How can an operator determine if the feature is in use by workloads?
616
634
617
-
We will introduce the new `job_succeeded_total` metric with `JobSuccessPolicy` and `Completions` reasons,
618
-
which indicates the following situations:
635
+
We will introduce the new `CompletionsReached` and `SuccessPolicy` reason labels to the `jobs_finished_total`,
636
+
which indicates the following situations:
637
+
638
+
- `CompletionsReached`indicates a job is declared as `Complete` because the number of succeeded job pods meet `.spec.completions`.
639
+
- `SuccessPolicy`indicates a job is declared as `Complete` because the job meets `.spec.successPolicy`.
619
640
620
-
- `JobSuccessPolicy`indicates a job is declared as `SuccessCriteriaMet` because the job meets `spec.succesPolicy`.
621
-
- `Completions`indicates a job is declared as `SuccessCriteriaMet` because the job meets `spec.completions`.
641
+
As we discussed in [this thread](https://github.com/kubernetes/kubernetes/pull/126075#discussion_r1677411216),
642
+
the new `CompletionsReached` reason label is used to count the successful jobs instead of existing "" reason label.
622
643
623
644
###### How can someone using this feature know that it is working for their instance?
624
645
625
646
- [x] Job API .status
626
-
- The Job controller will add a condition with `JobSuccessPolicy` reason to `conditions`.
647
+
- The Job controller will add a `SuccessCriteriaMet` condition with `SuccessPolicy` reason to `conditions`.
627
648
628
649
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
629
650
@@ -717,6 +738,7 @@ consider tuning the parameters for [APF](https://kubernetes.io/docs/concepts/clu
717
738
- 2024.02.07: API is finalized for the alpha stage.
718
739
- 2024.03.09: "Criteria"is replaced with "Rules".
719
740
- 2024.06.11: Beta Graduation.
741
+
- 2024.07.26: "CompletionsReached"reason is added and new reason labels are added to the "jobs_finished_total" metric.
0 commit comments