Skip to content

Commit fe077e5

Browse files
committed
add drawbacks and call DRA out of scope
1 parent b76ca88 commit fe077e5

File tree

1 file changed

+34
-10
lines changed
  • keps/sig-apps/5440-mutable-job-pod-resource-updates

1 file changed

+34
-10
lines changed

keps/sig-apps/5440-mutable-job-pod-resource-updates/README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ tags, and then generate with `hack/update-toc.sh`.
8888
- [Story 1](#story-1)
8989
- [Risks and Mitigations](#risks-and-mitigations)
9090
- [Design Details](#design-details)
91+
- [DRA Support](#dra-support)
9192
- [Test Plan](#test-plan)
9293
- [Unit tests](#unit-tests)
9394
- [Integration tests](#integration-tests)
@@ -107,6 +108,7 @@ tags, and then generate with `hack/update-toc.sh`.
107108
- [Implementation History](#implementation-history)
108109
- [Drawbacks](#drawbacks)
109110
- [Alternatives](#alternatives)
111+
- [Delete and Recreate Jobs](#delete-and-recreate-jobs)
110112
- [Infrastructure Needed (Optional)](#infrastructure-needed-optional)
111113
<!-- /toc -->
112114

@@ -128,11 +130,11 @@ checklist items _must_ be updated for the enhancement to be released.
128130

129131
Items marked with (R) are required *prior to targeting to a milestone / release*.
130132

131-
- [] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
132-
- [] (R) KEP approvers have approved the KEP status as `implementable`
133-
- [] (R) Design details are appropriately documented
134-
- [] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
135-
- [ ] e2e Tests for all Beta API Operations (endpoints)
133+
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
134+
- [x] (R) KEP approvers have approved the KEP status as `implementable`
135+
- [x] (R) Design details are appropriately documented
136+
- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
137+
- [] e2e Tests for all Beta API Operations (endpoints)
136138
- [ ] (R) Ensure GA e2e tests for meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
137139
- [ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
138140
- [] (R) Graduation criteria is in place
@@ -159,7 +161,7 @@ to allow suspending jobs to control when the Pods of a Job get created by contro
159161
This was proposed as a primitive to allow a higher-level queue controller to implement
160162
job queuing: the queue controller unsuspends the job when resources become available.
161163

162-
To complement the above capability, a queue controller may also want to control the
164+
To complement the above capability, a secondary controller may also want to control the
163165
resource requirements of a job based on current cluster capacity or resource availability.
164166
For example, it may want to adjust CPU, memory, and GPU requests/limits based on available
165167
node capacity, allocate specific extended resources like TPUs or FPGAs, optimize resource
@@ -168,7 +170,7 @@ priority and cluster load.
168170

169171
This is a proposal to relax update validation on suspended jobs to allow mutating
170172
resource specifications in the job's pod template, specifically CPU, memory, GPU,
171-
and other extended resource requests and limits. This enables a higher-level queue
173+
and other extended resource requests and limits. This enables a higher-level
172174
controller to optimize resource allocation before un-suspending a job based on
173175
current cluster conditions and resource availability.
174176

@@ -187,11 +189,10 @@ there's no way to optimize them based on actual cluster conditions when the job
187189
ready to run.
188190

189191
Adding the ability to mutate a job's resource requirements while it's suspended gives
190-
a queue controller the ability to optimize resource allocation based on real-time
192+
a controller the ability to optimize resource allocation based on real-time
191193
cluster conditions, improve overall cluster utilization, and ensure jobs are sized
192194
appropriately for current capacity constraints.
193195

194-
195196
### Goals
196197

197198
- Allow mutating CPU, memory, GPU, and extended resource requests and limits of a container within a PodTemplate of a suspended jobs.
@@ -207,6 +208,7 @@ appropriately for current capacity constraints.
207208
- Allow mutating other job specifications beyond container resource requirements.
208209
- Support in-place pod resource updates (this is covered by separate KEPs).
209210
- Allow mutating of Pod Resources.
211+
- Allow mutating of ResourceClaims.
210212

211213
## Proposal
212214

@@ -262,6 +264,15 @@ We will allow updates to the following fields in container specifications within
262264
- `resources.limits.memory`
263265
- `resources.limits.*` (for extended resources like `nvidia.com/gpu`, `amd.com/gpu`, `tpu-v4` etc.)
264266

267+
### DRA Support
268+
269+
DRA does not allow changing ResourceClaimTemplates once they are created.
270+
At the moment, relaxing mutability constraits of ResourceClaimTemplates or ResourceClaims is not in scope.
271+
To add support for this feature with DRA, the recommendation is to recreate ResourceClaimTemplates that match the
272+
desired resources.
273+
274+
One does not have to modify claims in the PodTemplate so one can still assume claims are immutable also.
275+
265276
### Test Plan
266277

267278
- Unit and integration tests verifying that:
@@ -531,7 +542,20 @@ This allows for more mutability of Jobs, particularly around resource specificat
531542

532543
## Alternatives
533544

534-
NA
545+
546+
### Delete and Recreate Jobs
547+
548+
One option is to keep this immutability and any modification of a Job should require a delete and create.
549+
550+
If there is a higher level controller controlling this Jobs with its own Owner References, then deletion is required on all resources that this job
551+
originally referenced.
552+
This is a common use case for JobSet which manages multiple jobs and services.
553+
Recreation would require deleting all existing jobs on an update if JobSet wanted to add support on updating JobTemplates while suspended.
554+
555+
In a multicluster scenario, deletion and recreation may require dispatching amoung different clusters.
556+
Think of a scenario where you have 1 hub cluster and many worker clusters. If uses the hub to dispatch to a worker cluster, then this would require one to delete
557+
the Job and propogate that deletion to the clusters. A patch is only a single operation so this would be faster.
558+
535559
## Infrastructure Needed (Optional)
536560

537561
NA

0 commit comments

Comments
 (0)