Skip to content

Commit a6a61cc

Browse files
Update implementation history for Indexed Job
Incorporate fixes done during implementation. Signed-off-by: Aldo Culquicondor <[email protected]>
1 parent ada8226 commit a6a61cc

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

keps/sig-apps/2214-indexed-job/README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
4848
- [x] (R) Production readiness review completed
4949
- [x] (R) Production readiness review approved
5050
- [x] "Implementation History" section is up-to-date for milestone
51-
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
51+
- [x] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
5252
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
5353

5454
[kubernetes.io]: https://kubernetes.io/
@@ -98,7 +98,7 @@ for Job queueing or workflows to support all of them.
9898

9999
### Goals
100100

101-
- Support the *array Job* pattern by adding completion indexes to each Pod
101+
- Support the *indexed Job* pattern by adding completion indexes to each Pod
102102
of a Job in *fixed completion count* mode.
103103

104104
### Non-Goals
@@ -136,7 +136,7 @@ spec:
136136
- name: INDEX
137137
valueFrom:
138138
fieldRef:
139-
fieldPath: metadata.annotations['batch.alpha.kubernetes.io/job-completion-index']
139+
fieldPath: metadata.annotations['batch.kubernetes.io/job-completion-index']
140140
```
141141
142142
### Notes/Constraints/Caveats (Optional)
@@ -187,25 +187,24 @@ const (
187187
188188
type JobSpec struct {
189189
...
190-
// CompletionMode specifies how Pod completions are tracked. It can be
191-
// `NonIndexed` (default) or `Indexed`.
190+
// CompletionMode specifies how Pod completions are tracked. It can be
191+
// `NonIndexed` (default) or `Indexed`.
192192
//
193-
// `NonIndexed` means that each Pod completion is homologous to each other.
194-
// The Job is considered complete when there have been .spec.completions
195-
// successful completions.
193+
// `NonIndexed` means that the Job is considered complete when there have
194+
// been .spec.completions successfully completed Pods. Each Pod completion is
195+
// homologous to each other.
196196
//
197-
// `Indexed` means that each Pod completion needs to be tracked individually;
198-
// each Pods gets an associated completion index, which is available in the
199-
// annotation `batch.alpha.kubernetes.io/job-completion-index`.
200-
// The Job is considered complete when there is one successful Pod for each
201-
// index in the range 0 to (.spec.completions - 1).
202-
// When value is `Indexed`, .spec.completions must have a non-zero positive
203-
// value and `.spec.parallelism` must be less than or equal to 10^5.
204-
//
205-
// More completion modes can be added in the future. If a Job controller
206-
// observes a mode that it doesn't recognize, it manages the Job as in
207-
// `NonIndexed`.
208-
CompletionMode CompletionMode
197+
// `Indexed` means that the Pods of a
198+
// Job get an associated completion index from 0 to (.spec.completions - 1),
199+
// available in the annotation batch.kubernetes.io/job-completion-index.
200+
// The Job is considered complete when there is one successfully completed Pod
201+
// for each index.
202+
// When value is `Indexed`, .spec.completions must be specified and
203+
// `.spec.parallelism` must be less than or equal to 10^5.
204+
// More completion modes can be added in the future. If the Job controller
205+
// observes a mode that it doesn't recognize, the controller skips updates
206+
// for the Job.
207+
CompletionMode *CompletionMode
209208
}
210209

211210
type JobStatus struct {
@@ -233,7 +232,7 @@ As the comment describes, when `.spec.completionMode = "Indexed"`:
233232
### Pod detail
234233

235234
The Pod and PodSpec APIs don't get any new fields. However, Pods created for
236-
Indexed Jobs get the annotation `batch.alpha.kubernetes.io/job-completion-index`
235+
Indexed Jobs get the annotation `batch.kubernetes.io/job-completion-index`
237236
with a value equal to its completion index. The annotation is immutable.
238237

239238
The annotation can be accessed through the downward API as a file or environment
@@ -253,7 +252,7 @@ spec:
253252
- name: JOB_COMPLETION_INDEX
254253
valueFrom:
255254
fieldRef:
256-
fieldPath: metadata.annotations['batch.alpha.kubernetes.io/job-completion-index']
255+
fieldPath: metadata.annotations['batch.kubernetes.io/job-completion-index']
257256
```
258257
259258
The Job controller doesn't add the environment variable if there is a name
@@ -380,7 +379,7 @@ without a completion index.
380379

381380
### Version Skew Strategy
382381

383-
This features has no node runtime implications.
382+
This feature has no node runtime implications.
384383

385384
## Production Readiness Review Questionnaire
386385

@@ -566,6 +565,7 @@ _This section must be completed when targeting beta graduation to a release._
566565

567566
* 2021-01-08: First version of the KEP in provisional status. Design Details
568567
completed.
568+
* 2021-03-03-09: Feature implemented under feature gate disabled by default.
569569

570570
## Drawbacks
571571

keps/sig-apps/2214-indexed-job/kep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kep-number: 2214
33
authors:
44
- "@alculquicondor"
55
owning-sig: sig-apps
6-
status: implementable
6+
status: implemented
77
creation-date: 2020-12-29
88
reviewers:
99
- "@soltysh"

0 commit comments

Comments
 (0)