Skip to content

Commit ce1798e

Browse files
committed
Adressed comments
1 parent 2d7df62 commit ce1798e

File tree

1 file changed

+27
-22
lines changed
  • keps/sig-scheduling/4816-dra-prioritized-list

1 file changed

+27
-22
lines changed

keps/sig-scheduling/4816-dra-prioritized-list/README.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -255,23 +255,15 @@ nitty-gritty.
255255
The `ResourceClaim` object contains a `DeviceClaim`, which in turn contains a
256256
list of `DeviceRequest` objects. This allows the user to allocate different
257257
types of devices for the same claim, and apply constraints and configuration
258-
across those different requests.
259-
260-
The proposal restructures the `DeviceRequest` object so there will be a
261-
`Name` field just like today, but for supporting either a single request
262-
or a prioritized list there will be the fields `Exactly` for a request without
263-
alternatives (type `SpecificDeviceRequest`) and `FirstAvailable` for providing a
264-
prioritized list of requests (type `DeviceSubRequest`). The other fields that are
265-
currently in the `DeviceRequest` object will be moved into one or both of the
266-
`SpecifiecDeviceRequest` and `DeviceSubRequest` objects.
267-
The list provided in the `FirstAvailable` field is
268-
considered a priority order, such that the scheduler will only try to use
269-
the second item in the list if it is unable to satisfy the first item,
270-
and so on. The `Exactly` and `FirstAvailable` fields are mutually exclusive.
271-
This is a breaking change to the `v1beta1` API, so this will be added in a
272-
new `v1beta2` resource API.
273-
274-
For the `v1beta1` API, there will be a new field called `FirstAvailable`
258+
across those different requests. These changes allow some flexibility for the
259+
user to create, say, a "gpu" request, but allow it to be satisfied by one of
260+
several models of GPU.
261+
262+
To avoid introducing a breaking API change and to ensure round-tripping
263+
between the APIs, the v1beta1 API will remain backward compatible
264+
(only extended) and the final change will be made in v1beta2.
265+
266+
The `v1beta1` API will be extended with a new field called `FirstAvailable`
275267
which will contain an ordered list of `DeviceSubRequest` objects. In order to
276268
satisfy the main (containing) request, exactly one of the requests listed in
277269
`FirstAvailable` must be satisfied. The order listed is considered a priority
@@ -283,8 +275,21 @@ used whenever `FirstAvailable` is used. To avoid this long term we are
283275
adding the `v1beta2` API described above, while doing the backwards-compatible
284276
change in the `v1beta1` API to ensure round-tripping between the APIs will work.
285277

286-
These changes allow some flexibility for the user to create, say, a "gpu"
287-
request, but allow it to be satisfied by one of several models of GPU.
278+
For the `v1beta2` API, the `DeviceRequest` object will be restructured
279+
so that there will be the `Name` field just like today, and for supporting
280+
either a single request or a prioritized list of subrequests, there will
281+
be separate fields:
282+
283+
* `Exactly` for a request of type `SpecificDeviceRequest` without alternatives.
284+
`SpecificDeviceRequest` will include all the fields that exists on the
285+
`DeviceRequest` type in v1beta1, except the `Name` field.
286+
* `FirstAvailable` for providing a prioritized list of requests, each of
287+
type `DeviceSubRequest`. The `DeviceSubRequest` type is similar to
288+
`SpecificDeviceRequest`, except for the `AdminAccess` field that is not
289+
available when providing multiple alternatives. The list provided in the
290+
`FirstAvailable` field is considered a priority order, such that the
291+
scheduler will only try to use the second item in the list if it is unable
292+
to satisfy the first item, and so on.
288293

289294
### User Stories
290295

@@ -1007,7 +1012,7 @@ they are all local to the control plane.
10071012

10081013
The proposed API change relaxes a `required` constraint on the
10091014
`DeviceRequest.DeviceClassName` field. The `DeviceRequest` thus becomes a one-of
1010-
that must have either the `DeviceClassName` or the `FirstAvailableOf` field
1015+
that must have either the `DeviceClassName` or the `FirstAvailable` field
10111016
populated.
10121017

10131018
Older clients have been advised in the current implementation to check this
@@ -1070,7 +1075,7 @@ This is an add-on on top of the `DynamicResourceAllocation` feature gate, which
10701075
also must be enabled for this feature to work.
10711076

10721077
- [x] Feature gate (also fill in values in `kep.yaml`)
1073-
- Feature gate name: DRAFirstAvailableOf
1078+
- Feature gate name: DRAFirstAvailable
10741079
- Components depending on the feature gate:
10751080
- kube-apiserver
10761081
- kube-scheduler
@@ -1506,7 +1511,7 @@ type ResourceClaimSpec struct {
15061511
This is arguably simpler and allows them to be essentially complete, alternate
15071512
claims. It would be more difficult for the user, though, as it would require
15081513
duplication of other device requests. Additionally, if there were multiple
1509-
separate `FirstAvailableOf` requests in a claim, the user would have to specify
1514+
separate `FirstAvailable` requests in a claim, the user would have to specify
15101515
all the combinations of those in order to get the same flexibility.
15111516

15121517
## Infrastructure Needed (Optional)

0 commit comments

Comments
 (0)