Skip to content

Commit 11a976c

Browse files
authored
Merge pull request kubernetes#3023 from ahg-g/ahg-job-affinity
update job mutable scheduling directives to include annotations and labels
2 parents 58d5c4a + 51c4069 commit 11a976c

File tree

1 file changed

+12
-9
lines changed
  • keps/sig-scheduling/2926-job-mutable-scheduling-directives

1 file changed

+12
-9
lines changed

keps/sig-scheduling/2926-job-mutable-scheduling-directives/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,10 @@ which group of nodes a job should run. For example, it may want to send the job
161161
specific partition (e.g., preemptibles) or a specific location (e.g., zone x).
162162

163163
This is a proposal to relax update validation on jobs that have never been unsuspended to
164-
allow mutating node scheduling directives, namely node affinity, node selector and tolerations of
165-
the job's pod template. This enables a higher-level queue controller to inject such directives before
166-
un-suspending a job to influence its placement.
164+
allow mutating node scheduling directives, namely the pod template's node affinity,
165+
node selector, tolerations, annotations and labels of the job's pod template. This enables
166+
a higher-level queue controller to inject such directives before un-suspending a job to
167+
influence its placement.
167168

168169
<!--
169170
This section is incredibly important for producing high-quality, user-focused
@@ -215,8 +216,8 @@ demonstrate the interest in a KEP within the wider Kubernetes community.
215216

216217
### Goals
217218

218-
- Allow mutating node affinity, node selector and tolerations of jobs that
219-
have never been unsuspended.
219+
- Allow mutating node affinity, node selector, tolerations, annotations and labels of
220+
the pod template of jobs that have never been unsuspended.
220221

221222

222223
<!--
@@ -241,7 +242,8 @@ and make progress.
241242
## Proposal
242243

243244
The proposal is to relax update validation of scheduling bits of jobs that have never
244-
been unsuspended, specifically node affinity, node selector and tolerations.
245+
been unsuspended, specifically node affinity, node selector, tolerations, annotations and
246+
labels of the pod template.
245247

246248
This has no impact on the job-controller. The job controller has no dependency
247249
on those scheduling directives expressed in a job's pod template.
@@ -317,7 +319,7 @@ Consider including folks who also work outside the SIG or subproject.
317319

318320
The pod template validation logic in the API server, what we need to do is relax the validation
319321
of the Job's Template field which is currently immutable to be mutable for node affinity,
320-
node selector and tolerations.
322+
node selector, tolerations, annotations and labels.
321323

322324
The condition we will check to verify that the job has never been unsuspended before is
323325
`Job.Spec.Suspend=true && Job.Status.StartTime=nil`.
@@ -332,8 +334,8 @@ proposal will be implemented, this is the place to discuss them.
332334
### Test Plan
333335

334336
- Unit and integration tests veryfing that:
335-
- node affinity, node selector or tolerations not mutable for jobs that have been unsuspended before
336-
- node affinity, node selector or tolerations not mutable for apps other than jobs
337+
- pod template's node affinity, node selector, tolerations, annotations and labels not mutable for jobs that have been unsuspended before
338+
- pod template's node affinity, node selector tolerations, annotations or labels not mutable for apps other than jobs
337339
- job controller observes the update and creates pods with the new scheduling directives
338340

339341
<!--
@@ -818,6 +820,7 @@ N/A.
818820
## Implementation History
819821

820822
- 2021-09-01: Proposed KEP starting in beta status.
823+
- 2021-10-28: Updated the KEP to include annotations and labels of the pod template
821824

822825
<!--
823826
Major milestones in the lifecycle of a KEP should be tracked in this section.

0 commit comments

Comments
 (0)