Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
485b0681
Commit
485b0681
authored
Feb 08, 2016
by
Eric Tune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update paths after move.
Also improve doc slightly.
parent
7734dd8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
selector-generation.md
docs/design/selector-generation.md
+15
-7
job.md
docs/proposals/job.md
+1
-1
No files found.
docs/design/selector-generation.md
View file @
485b0681
...
@@ -48,11 +48,17 @@ Make it really hard to accidentally create a job which has an overlapping select
...
@@ -48,11 +48,17 @@ Make it really hard to accidentally create a job which has an overlapping select
# Proposed changes
# Proposed changes
## API
server
## API
`extensions/v1beta1 Job`
remains the same.
`batch/v1 Job`
changes change as follows.
`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
### Automatic Mode
...
@@ -72,10 +78,6 @@ There are two allowed usage modes:
...
@@ -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.
-
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.
-
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
### Rationale
UID is better than Name in that:
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
...
@@ -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.
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
### Overriding Unique Labels
If user does specify
`job.spec.selector`
then the user must also specify
`job.spec.noAutoSelector`
.
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
...
@@ -128,6 +134,8 @@ We probably want as much as possible the same behavior for Job and ReplicationCo
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[

]()
[

]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
<!-- END MUNGE: GENERATED_ANALYTICS -->
docs/proposals/job.md
View file @
485b0681
...
@@ -185,7 +185,7 @@ Below are the possible future extensions to the Job controller:
...
@@ -185,7 +185,7 @@ Below are the possible future extensions to the Job controller:
[
this comment
](
https://github.com/kubernetes/kubernetes/issues/1624#issuecomment-97622142
)
)
[
this comment
](
https://github.com/kubernetes/kubernetes/issues/1624#issuecomment-97622142
)
)
*
Be able to inspect Pods running a Job, especially after a Job has finished, e.g.
*
Be able to inspect Pods running a Job, especially after a Job has finished, e.g.
by providing pointers to Pods in the JobStatus (
[
see comment
](
https://github.com/kubernetes/kubernetes/pull/11746/files#r37142628
)
).
by providing pointers to Pods in the JobStatus (
[
see comment
](
https://github.com/kubernetes/kubernetes/pull/11746/files#r37142628
)
).
*
help users avoid non-unique label selectors (
[
see this proposal
](
selector-generation.md
)
)
*
help users avoid non-unique label selectors (
[
see this proposal
](
../../docs/design/
selector-generation.md
)
)
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment