diff options
| author | Eric Tune <etune@google.com> | 2016-02-08 13:11:43 -0800 |
|---|---|---|
| committer | Eric Tune <etune@google.com> | 2016-02-12 14:34:03 -0800 |
| commit | 8fb57ee0a7c18ccc6cd865a3b0eebf7ba3fc9614 (patch) | |
| tree | b4d2ca2a4c3895ec3b69be1ff899ab4c9e43e301 | |
| parent | 6b860503708c4546c4b2b57a736d673176685b96 (diff) | |
Update paths after move.
Also improve doc slightly.
| -rw-r--r-- | selector-generation.md | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/selector-generation.md b/selector-generation.md index 27107c31..032129b6 100644 --- a/selector-generation.md +++ b/selector-generation.md @@ -48,11 +48,17 @@ Make it really hard to accidentally create a job which has an overlapping select # Proposed changes -## APIserver +## API `extensions/v1beta1 Job` remains the same. `batch/v1 Job` changes change as follows. -There are two allowed usage modes: +Field `job.spec.noAutoSelector` is added. It controls whether selectors are automatically +generated. In automatic mode, user cannot make the mistake of creating non-unique selectors. +In manual mode, certain rare use cases are supported. + +Validation is not changed. A selector must be provided, and it must select the pod template. + +Defaulting changes. Defaulting happens in one of two modes: ### Automatic Mode @@ -72,10 +78,6 @@ There are two allowed usage modes: - User puts a unique label or label(s) on pod template (required). user does think carefully about uniqueness. - No defaulting of pod labels or the selector happen. -### Common to both modes - -- Validation code ensures that the selector on the job selects the labels on the pod template, and rejects if not. - ### Rationale UID is better than Name in that: @@ -89,6 +91,10 @@ Commands like `kubectl get pods -l job-name=myjob` should do exactly what is wa Using both gets the benefits of both, at the cost of some label verbosity. +The field is a `*bool`. Since false is expected to be much more common, +and since the feature is complex, it is better to leave it unspecified so that +users looking at a stored pod spec do not need to be aware of this field. + ### Overriding Unique Labels If user does specify `job.spec.selector` then the user must also specify `job.spec.noAutoSelector`. @@ -128,6 +134,8 @@ We probably want as much as possible the same behavior for Job and ReplicationCo + + <!-- BEGIN MUNGE: GENERATED_ANALYTICS --> -[]() +[]() <!-- END MUNGE: GENERATED_ANALYTICS --> |
