Skip to content

Commit cf86b93

Browse files
committed
Update the API design.
1 parent d76b557 commit cf86b93

File tree

1 file changed

+18
-20
lines changed
  • keps/sig-scheduling/4815-dra-partitionable-devices

1 file changed

+18
-20
lines changed

keps/sig-scheduling/4815-dra-partitionable-devices/README.md

+18-20
Original file line numberDiff line numberDiff line change
@@ -374,25 +374,24 @@ fields on the `ResourceSlice`.
374374

375375
1. The `Device` field is a list of named `DeviceMixin`s. These define
376376
attributes and capacities that can be used to extend what is defined
377-
explicitly in a new device type called `CompositeDevice` (introduced
377+
explicitly in `BasicDevice` (introduced
378378
in more detail below). Mixins cannot be allocated directly,
379379
but can only be referenced by composite devices.
380380

381381
1. The `DeviceCapacityConsumption` field defines a list of named
382382
`DeviceCapacityConsumptionMixin`s. These define capacities that can be
383-
used to extend the capacity consumption defined explicitly in a
384-
`CompositeDevice`. The capacity pool is not specified in the
383+
used to extend the capacity consumption defined explicitly in fields under
384+
`BasicDevice`. The capacity pool is not specified in the
385385
`DeviceCapacityConsumptionMixin`, but rather provided when the mixin
386386
is referenced from the device.
387387

388-
1. Introduce a new device type called `CompositeDevice` which has the same
389-
fields as a `BasicDevice`, plus two more. The first is a field called
388+
1. Introduce a couple of new fields added under `BasicDevice`. The first is a field called
390389
`Includes` and lists the device mixins for the device, while the second is
391390
called `ConsumesCapacity` and defines the capacity the device will draw
392391
from the capacity pools.
393392

394393
1. The `Includes` field serves to reference a set of `DeviceMixin`s that a
395-
`CompositeDevice` can reference to extend the set of attributes,
394+
`BasicDevice` can reference to extend the set of attributes,
396395
capacities it defines explicitly.
397396

398397
1. The `ConsumesCapacity` field defines the capacities the device
@@ -401,7 +400,7 @@ fields on the `ResourceSlice`.
401400
to capacity pools in the same `ResourceSlice` is supported.
402401

403402
1. Add a new field `PerDeviceNodeSelection` to the `ResourceSliceSpec` and the
404-
fields `NodeName`, `NodeSelector` and `AllNodes` on the `CompositeDevice`.
403+
fields `NodeName`, `NodeSelector` and `AllNodes` on the `Device`.
405404

406405
1. The `PerDeviceNodeSelection` field is of type boolean and is mutually
407406
exclusive with the existing node selection fields in the `ResourceSliceSpec`
@@ -613,16 +612,7 @@ type Device struct {
613612
// +optional
614613
// +oneOf=deviceType
615614
Basic *BasicDevice
616-
617-
// Composite defines one composite device instance.
618-
//
619-
// +optional
620-
// +oneOf=deviceType
621-
Composite *CompositeDevice
622-
}
623-
624-
// CompositeDevice defines one device instance.
625-
type CompositeDevice struct {
615+
626616
// Includes defines the set of device mixins that this device includes.
627617
//
628618
// The propertes of each included mixin are applied to this device in
@@ -2905,9 +2895,17 @@ drivers that they provide to customers.
29052895

29062896
### Version Skew Strategy
29072897

2908-
All of the API extensions proposed in this KEP are embedded under a new
2909-
`CompositeDevice` type which is a one-of inside of the existing `Device`
2910-
type. Since all API extensions are embedded in this way, there is no risk for
2898+
All of the API extensions proposed in this KEP are embedded under the
2899+
`BasicDevice` type which is a one-of inside of the existing `Device`
2900+
type. The new function will be offered through the newly added fields under `BasicDevice`.
2901+
The kube-scheduler is expected to match the kube-apiserver minor version,
2902+
but may be up to one minor version older (to allow live upgrades).
2903+
In the release it's been added, the feature will be disabled by default and not recognized by other components.
2904+
Whoever enabled the feature manually would take the risk of component like kube-scheduler being old and not recognize
2905+
the fields. After one releases, it should work perfectly.
2906+
2907+
2908+
Since all API extensions are embedded in this way, there is no risk for
29112909
version skew downgrades because these devices will never have existed in older
29122910
clusters. For upgrades, we will need to be sure not to directly extend this new
29132911
device type with new fields, but rather introduce a new one-of if more /

0 commit comments

Comments
 (0)