Skip to content

Commit d7b7d1e

Browse files
committed
Add extended resource name in the default device-class for full GPU requests
* This allows users to continue using extended resource requests in a pod to request either extended resoures provided by the device-plugin or DRA. * To make use of this, users need to enable an alpha feature gate 'DRAExtendedResource' Signed-off-by: Shiva Krishna, Merla <[email protected]>
1 parent e3ca3e1 commit d7b7d1e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{{- if .Values.resources.gpus.enabled }}
2+
{{- $resourceApiVersion := (include "nvidia-dra-driver-gpu.resourceApiVersion" . | trim) }}
23
---
3-
apiVersion: {{ include "nvidia-dra-driver-gpu.resourceApiVersion" . }}
4+
apiVersion: {{ $resourceApiVersion }}
45
kind: DeviceClass
56
metadata:
67
name: gpu.nvidia.com
78
spec:
89
selectors:
910
- cel:
1011
expression: "device.driver == 'gpu.nvidia.com' && device.attributes['gpu.nvidia.com'].type == 'gpu'"
12+
{{- if eq $resourceApiVersion "resource.k8s.io/v1" }}
13+
extendedResourceName: nvidia.com/gpu
14+
{{- end }}
1115
{{- end }}

0 commit comments

Comments
 (0)