Skip to content

Commit eb2e19a

Browse files
committed
fixup! review feedback
1 parent 58d8371 commit eb2e19a

File tree

2 files changed

+31
-13
lines changed
  • keps/sig-scheduling
    • 5027-dra-admin-controlled-device-attributes
    • 5055-dra-device-taints-and-tolerations

2 files changed

+31
-13
lines changed

keps/sig-scheduling/5027-dra-admin-controlled-device-attributes/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,10 @@ type DevicePatch struct {
276276
// If a ResourceSlice and a DevicePatch define the same attribute or
277277
// capacity, the value of the DevicePatch is used. If multiple
278278
// different DevicePatches match the same device, then the one with
279-
// the highest priority wins. If the priorities are the same, it is non-deterministic
280-
// which patch is used.
279+
// the highest priority wins. If priorities are equal, the older
280+
// patch wins. This ensures that adding a new patch does not
281+
// accidentally change the effect of some existing patch unless
282+
// that is clearly intended according to the priority.
281283
//
282284
// +optional
283285
Priority *int

keps/sig-scheduling/5055-dra-device-taints-and-tolerations/README.md

+27-11
Original file line numberDiff line numberDiff line change
@@ -248,19 +248,24 @@ type BasicDevice struct {
248248

249249
// If specified, the device's taints.
250250
//
251+
// The maximum number of taints is 8.
252+
//
251253
// This is an alpha field and requires enabling the DRADeviceTaints
252254
// feature gate.
253255
//
254256
// +optional
255257
// +listType=atomic
256258
// +featureGate=DRADeviceTaints
257-
Taints []Taint
259+
Taints []DeviceTaint
258260
}
259261

260-
// The device this Taint is attached to has the "effect" on
262+
// DeviceTaintsMaxLength is the maximum number of taints per device.
263+
const DeviceTaintsMaxLength = 8
264+
265+
// The device this DeviceTaint is attached to has the "effect" on
261266
// any claim and, through the claim, to pods that do not tolerate
262267
// the Taint.
263-
type Taint struct {
268+
type DeviceTaint struct {
264269
// The taint key to be applied to a device.
265270
// Must be a label name.
266271
//
@@ -279,7 +284,7 @@ type Taint struct {
279284
// nodes is not valid here.
280285
//
281286
// +required
282-
Effect TaintEffect
287+
Effect DeviceTaintEffect
283288

284289
// ^^^^
285290
//
@@ -316,14 +321,23 @@ type DeviceRequest struct {
316321
// it has these tainted devices. Once all pods are evicted, the
317322
// claim will get deallocated.
318323
//
324+
// The maximum number of tolerations is 16.
325+
//
326+
// This is an alpha field and requires enabling the DRADeviceTaints
327+
// feature gate.
328+
//
319329
// +optional
320330
// +listType=atomic
321-
Tolerations []Toleration
331+
// +featureGate=DRADeviceTaints
332+
Tolerations []DeviceToleration
322333
}
323334

335+
// DeviceTolerationsMaxLength is the maximum number of tolerations in a DeviceRequest.
336+
const DeviceTolerationsMaxLength = 16
337+
324338
// The ResourceClaim this Toleration is attached to tolerate any taint that matches
325339
// the triple <key,value,effect> using the matching operator <operator>.
326-
type Toleration struct {
340+
type DeviceToleration struct {
327341
// Key is the taint key that the toleration applies to. Empty means match all taint keys.
328342
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
329343
// Must be a label name.
@@ -350,7 +364,7 @@ type Toleration struct {
350364
// When specified, allowed values are NoSchedule and NoExecute.
351365
//
352366
// +optional
353-
Effect TaintEffect
367+
Effect DeviceTaintEffect
354368

355369
// TolerationSeconds represents the period of time the toleration (which must be
356370
// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
@@ -364,11 +378,11 @@ type Toleration struct {
364378
// A toleration operator is the set of operators that can be used in a toleration.
365379
//
366380
// +enum
367-
type TolerationOperator string
381+
type DeviceTolerationOperator string
368382

369383
const (
370-
TolerationOpExists TolerationOperator = "Exists"
371-
TolerationOpEqual TolerationOperator = "Equal"
384+
DeviceTolerationOpExists DeviceTolerationOperator = "Exists"
385+
DeviceTolerationOpEqual DeviceTolerationOperator = "Equal"
372386
)
373387
```
374388

@@ -395,13 +409,15 @@ type DevicePatch struct {
395409
// are used in multiple places, the same precedence rules as for attributes apply
396410
// (see the priority field).
397411
//
412+
// The maximum number of tolerations is 16.
413+
//
398414
// This is an alpha field and requires enabling the DRADeviceTaints
399415
// feature gate.
400416
//
401417
// +optional
402418
// +listType=atomic
403419
// +featureGate=DRADeviceTaints
404-
Taints []Taint
420+
Taints []DeviceTaint
405421
```
406422
407423
### Test Plan

0 commit comments

Comments
 (0)