Skip to content

Commit 174e2db

Browse files
committed
Reflect API review: fix +listType and improve some API descriptions
1 parent 5107c19 commit 174e2db

File tree

1 file changed

+41
-19
lines changed
  • keps/sig-scheduling/5007-device-attach-before-pod-scheduled

1 file changed

+41
-19
lines changed

keps/sig-scheduling/5007-device-attach-before-pod-scheduled/README.md

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -343,25 +343,37 @@ These fields will be used by the controller that exposes the `ResourceSlice` to
343343
```go
344344
// BasicDevice represents a basic device instance.
345345
type BasicDevice struct {
346-
// BindingConditions defines the conditions for proceeding with binding. All listed conditions must be True to proceed with binding.
346+
...
347+
// UsageRestrictedToNode indicates if the usage of an allocation involving this device
348+
// has to be limited to exactly the node that was chosen when allocating the claim.
347349
//
348350
// +optional
349-
BindingConditions []string
351+
UsageRestrictedToNode bool
350352

351-
// BindingFailureConditions defines the conditions for binding failure.
352-
// If true, a binding failure occurred.
353+
// BindingConditions defines the conditions for proceeding with binding.
354+
// All of these conditions must be set in the per-device status
355+
// conditions with a value of True to proceed with binding the pod to the node
356+
// while scheduling the pod.
357+
// The maximum number of binding conditions is 4.
353358
//
354359
// +optional
355-
BindingFailureConditions []string
360+
// +listType=atomic
361+
BindingConditions []string
356362

357-
// UsageRestrictedToNode indicates if the usage of an allocation involving this device
358-
// has to be limited to exactly the node that was chosen when allocating the claim.
363+
// BindingFailureConditions defines the conditions for binding failure.
364+
// They may be set in the per-device status conditions.
365+
// If any is true, a binding failure occurred.
366+
// The maximum number of binding failure conditions is 4.
359367
//
360368
// +optional
361-
UsageRestrictedToNode bool
369+
// +listType=atomic
370+
BindingFailureConditions []string
362371

363372
// BindingTimeout indicates the prepare timeout period.
364-
// If the timeout period is exceeded before all BindingConditions reach a True state, the scheduler clears the allocation in the ResourceClaim and reschedules the Pod.
373+
// If the timeout period is exceeded before all BindingConditions reach a True state,
374+
// the scheduler clears the allocation in the ResourceClaim and reschedules the Pod.
375+
//
376+
// The default timeout if not set is 10 minutes.
365377
//
366378
// +optional
367379
BindingTimeout *metav1.Duration
@@ -384,26 +396,36 @@ For this feature, following fields are added:
384396
// AllocatedDeviceStatus contains the status of an allocated device, if the
385397
// driver chooses to report it. This may include driver-specific information.
386398
type AllocatedDeviceStatus struct {
387-
...
388-
// BindingConditions defines the conditions for proceeding with binding. All listed conditions must be True to proceed with binding.
399+
...
400+
// UsageRestrictedToNode is a copy of the UsageRestrictedToNode
401+
// as defined for the device at the time when it was allocated.
402+
// If true, the node selector of the allocation matches exactly
403+
// the node that was chosen for the pod which triggered allocation.
404+
//
405+
// +optional
406+
UsageRestrictedToNode bool
407+
408+
// BindingConditions is a copy of the BindingConditions
409+
// as defined for the device at the time when it was allocated.
410+
// All of these conditions must be to True to proceed with binding the pod to the node
411+
// while scheduling the pod.
389412
//
390413
// +optional
391414
BindingConditions []string
392415

393-
// BindingFailureConditions defines the conditions for binding failure.
416+
// BindingFailureConditions is a copy of the BindingFailureConditions
417+
// as defined for the device at the time when it was allocated.
394418
// If any is True, a binding failure occurred.
395419
//
396420
// +optional
397421
BindingFailureConditions []string
398422

399-
// UsageRestrictedToNode indicates if the usage of an allocation involving this device
400-
// has to be limited to exactly the node that was chosen when allocating the claim.
423+
// BindingTimeout is a copy of the BindingTimeout
424+
// as defined for the device at the time when it was allocated.
425+
// If the timeout period is exceeded before all BindingConditions reach a True state,
426+
// the scheduler clears the allocation in the ResourceClaim and reschedules the Pod.
401427
//
402-
// +optional
403-
UsageRestrictedToNode bool
404-
405-
// BindingTimeout indicates the prepare timeout period.
406-
// If the timeout period is exceeded before all BindingConditions reach a True state, the scheduler clears the allocation in the ResourceClaim and reschedules the Pod.
428+
// The default timeout if not set is 10 minutes.
407429
//
408430
// +optional
409431
BindingTimeout *metav1.Duration

0 commit comments

Comments
 (0)