Skip to content

Commit 9b59060

Browse files
authored
Merge pull request #737 from shivamerla/extended_resource_name
Add an extended resource name in the default device-class for full GPU requests
2 parents f230983 + d7b7d1e commit 9b59060

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)