We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f230983 + d7b7d1e commit 9b59060Copy full SHA for 9b59060
deployments/helm/nvidia-dra-driver-gpu/templates/deviceclass-gpu.yaml
@@ -1,11 +1,15 @@
1
{{- if .Values.resources.gpus.enabled }}
2
+{{- $resourceApiVersion := (include "nvidia-dra-driver-gpu.resourceApiVersion" . | trim) }}
3
---
-apiVersion: {{ include "nvidia-dra-driver-gpu.resourceApiVersion" . }}
4
+apiVersion: {{ $resourceApiVersion }}
5
kind: DeviceClass
6
metadata:
7
name: gpu.nvidia.com
8
spec:
9
selectors:
10
- cel:
11
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 }}
15
{{- end }}
0 commit comments