Skip to content

Commit d0eca44

Browse files
committed
[KEP-4817] DRAResourceClaimDeviceStatus documentation
Signed-off-by: Lionel Jouin <[email protected]>
1 parent c75951c commit d0eca44

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

content/en/docs/concepts/scheduling-eviction/dynamic-resource-allocation.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ weight: 65
1111

1212
{{< feature-state feature_gate_name="DynamicResourceAllocation" >}}
1313

14+
Dynamic Resource Allocation with ResourceClaim device status:
15+
16+
{{< feature-state feature_gate_name="DRAResourceClaimDeviceStatus" >}}
17+
1418
Dynamic resource allocation is an API for requesting and sharing resources
1519
between pods and containers inside a pod. It is a generalization of the
1620
persistent volumes API for generic resources. Typically those resources
@@ -47,7 +51,11 @@ ResourceClaim
4751
for use by workloads. For example, if a workload needs an accelerator device
4852
with specific properties, this is how that request is expressed. The status
4953
stanza tracks whether this claim has been satisfied and what specific
50-
resources have been allocated.
54+
resources have been allocated. When the `DRAResourceClaimDeviceStatus`
55+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is
56+
enabled, drivers can report driver-specific device status data for each allocated
57+
device in a resource claim. For example, IPs assigned to a network interface device
58+
can be reported in the ResourceClaim status.
5159

5260
ResourceClaimTemplate
5361
: Defines the spec and some metadata for creating
@@ -209,6 +217,10 @@ are enabled. For details on that, see the `--feature-gates` and `--runtime-confi
209217
[kube-apiserver parameters](/docs/reference/command-line-tools-reference/kube-apiserver/).
210218
kube-scheduler, kube-controller-manager and kubelet also need the feature gate.
211219

220+
When a resource driver reports the status of the devices, then the
221+
`DRAResourceClaimDeviceStatus` feature gate has to be enabled in addition to
222+
`DynamicResourceAllocation`.
223+
212224
A quick check whether a Kubernetes cluster supports the feature is to list
213225
DeviceClass objects with:
214226

@@ -229,6 +241,11 @@ If not supported, this error is printed instead:
229241
error: the server doesn't have a resource type "deviceclasses"
230242
```
231243

244+
A ResourceClaim device status is supported when it is possible, from a DRA driver,
245+
to update an existing ResourceClaim where the `status.devices` field is set. When the
246+
`DRAResourceClaimDeviceStatus` feature is disabled, that field automatically
247+
gets cleared when storing the ResourceClaim.
248+
232249
The default configuration of kube-scheduler enables the "DynamicResources"
233250
plugin if and only if the feature gate is enabled and when using
234251
the v1 configuration API. Custom configurations may have to be modified to
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: DRAResourceClaimDeviceStatus
3+
content_type: feature_gate
4+
_build:
5+
list: never
6+
render: false
7+
8+
stages:
9+
- stage: alpha
10+
defaultValue: false
11+
fromVersion: "1.32"
12+
---
13+
Enables support the ResourceClaim.status.devices field and for setting this
14+
status from DRA drivers.

0 commit comments

Comments
 (0)