Skip to content

Commit ee7b4c1

Browse files
committed
[KEP-5004] DRA Extended resource documentation
1 parent 8abf4ae commit ee7b4c1

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,39 @@ create ResourceClaim or ResourceClaimTemplate objects in namespaces labeled with
424424
`adminAccess` field. This ensures that non-admin users cannot misuse the
425425
feature.
426426

427+
### Extended resource {#extended-resource}
428+
429+
{{< feature-state feature_gate_name="DRAExtendedResource" >}}
430+
431+
You can provide an extended resource name for a DeviceClass. The scheduler will then
432+
select the devices matching the class for the extended resource requests. This allows
433+
users to continue using extended resource requests in a pod to request either
434+
extended resources provided by device plugin, or DRA devices. The same extended
435+
resource can be provided either by device plugin, or DRA on one single cluster node.
436+
The same extended resource can be provided by device plugin on some nodes, and
437+
DRA on other nodes in the same cluster.
438+
439+
In the example below, the DeviceClass is given an extendedResourceName `example.com/gpu`.
440+
If a pod requested for the extended resource `example.com/gpu: 2`, it can be scheduled to
441+
a node with two or more devices matching the DeviceClass.
442+
443+
```yaml
444+
apiVersion: resource.k8s.io/v1beta2
445+
kind: DeviceClass
446+
metadata:
447+
name: gpu.example.com
448+
spec:
449+
selectors:
450+
- cel:
451+
expression: device.driver == 'gpu.example.com' && device.attributes['gpu.example.com'].type
452+
== 'gpu'
453+
extendedResourceName: example.com/gpu
454+
```
455+
456+
Extended resource is an *alpha feature* and only enabled when the
457+
`DRAExtendedResource` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
458+
is enabled in the kube-apiserver, kube-scheduler, and kubelet.
459+
427460
### Prioritized list {#prioritized-list}
428461

429462
{{< feature-state feature_gate_name="DRAPrioritizedList" >}}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: DRAExtendedResource
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.34"
12+
---
13+
Enables support for the [Extended Resource](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource)
14+
feature. It makes it possible to specify an extended resource name in a DeviceClass.
15+
16+
This feature gate has no effect unless you also enable the `DynamicResourceAllocation` feature gate.

0 commit comments

Comments
 (0)