Skip to content

Commit c690c3d

Browse files
committed
chore: allow changing CDI_ROOT via values
Signed-off-by: hydazz <[email protected]>
1 parent 8e4a980 commit c690c3d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

deployments/helm/nvidia-dra-driver-gpu/templates/kubeletplugin.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ spec:
129129
- name: NVIDIA_VISIBLE_DEVICES
130130
value: void
131131
- name: CDI_ROOT
132-
value: /var/run/cdi
132+
value: {{ .Values.cdiRoot | quote }}
133133
- name: NVIDIA_MIG_CONFIG_DEVICES
134134
value: all
135135
- name: NODE_NAME
@@ -166,7 +166,7 @@ spec:
166166
mountPath: {{ .Values.kubeletPlugin.kubeletPluginsDirectoryPath | quote }}
167167
mountPropagation: Bidirectional
168168
- name: cdi
169-
mountPath: /var/run/cdi
169+
mountPath: {{ .Values.cdiRoot | quote }}
170170
- name: driver-root
171171
mountPath: /driver-root
172172
readOnly: true
@@ -220,7 +220,7 @@ spec:
220220
- name: NVIDIA_VISIBLE_DEVICES
221221
value: void
222222
- name: CDI_ROOT
223-
value: /var/run/cdi
223+
value: {{ .Values.cdiRoot | quote }}
224224
- name: NVIDIA_MIG_CONFIG_DEVICES
225225
value: all
226226
- name: NODE_NAME
@@ -259,7 +259,7 @@ spec:
259259
mountPath: {{ .Values.kubeletPlugin.kubeletPluginsDirectoryPath | quote }}
260260
mountPropagation: Bidirectional
261261
- name: cdi
262-
mountPath: /var/run/cdi
262+
mountPath: {{ .Values.cdiRoot | quote }}
263263
- name: driver-root
264264
mountPath: /driver-root
265265
readOnly: true
@@ -274,7 +274,7 @@ spec:
274274
path: {{ .Values.kubeletPlugin.kubeletPluginsDirectoryPath | quote }}
275275
- name: cdi
276276
hostPath:
277-
path: /var/run/cdi
277+
path: {{ .Values.cdiRoot | quote }}
278278
- name: driver-root-parent
279279
hostPath:
280280
# If nvidiaDriverRoot == "/" then its parent is itself. Otherwise, get

deployments/helm/nvidia-dra-driver-gpu/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ nvidiaDriverRoot: /
2626
# If not specified, the default path inferred from the nvidia-container-toolkit library version will be used.
2727
nvidiaCDIHookPath: ""
2828

29+
# CDI root directory path.
30+
# This is where CDI spec files are stored and accessed by the runtime.
31+
cdiRoot: "/var/run/cdi"
32+
2933
nameOverride: ""
3034
fullnameOverride: ""
3135
namespaceOverride: ""

0 commit comments

Comments
 (0)