File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
deployments/helm/nvidia-device-plugin Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ spec:
207207 - name : kubelet-device-plugins-dir
208208 mountPath : /var/lib/kubelet/device-plugins
209209 {{- if typeIs "string" .Values.nvidiaDriverRoot }}
210- # We always mount the driver root at /driver-root in the container.
210+ # We mount the driver root at /driver-root in the container.
211211 # This is required for CDI detection to work correctly.
212212 - name : driver-root
213213 mountPath : /driver-root
@@ -242,12 +242,12 @@ spec:
242242 - name : mps-shm
243243 hostPath :
244244 path : {{ .Values.mps.root }}/shm
245- {{- if typeIs "string" .Values.nvidiaDriverRoot }}
245+ {{- if typeIs "string" .Values.nvidiaDriverRoot }}
246246 - name : driver-root
247247 hostPath :
248- path : {{ .Values.nvidiaDriverRoot }}
248+ path : {{ .Values.nvidiaDriverRoot | toYaml }}
249249 type : Directory
250- {{- end }}
250+ {{- end }}
251251 - name : cdi-root
252252 hostPath :
253253 path : /var/run/cdi
Original file line number Diff line number Diff line change @@ -177,11 +177,18 @@ spec:
177177 - name : DEVICE_DISCOVERY_STRATEGY
178178 value : {{ .Values.deviceDiscoveryStrategy }}
179179 {{- end }}
180+ {{- .Values.gfd.env | toYaml | nindent 10 }}
180181 securityContext :
181182 {{- include "gpu-feature-discovery.securityContext" . | nindent 10 }}
182183 volumeMounts :
183184 - name : output-dir
184185 mountPath : " /etc/kubernetes/node-feature-discovery/features.d"
186+ {{- if typeIs "string" .Values.nvidiaDriverRoot }}
187+ # We mount the driver root at /driver-root in the container.
188+ - name : driver-root
189+ mountPath : /driver-root
190+ readOnly : true
191+ {{- end }}
185192 - name : host-sys
186193 mountPath : " /sys"
187194 {{- if $options.hasConfigMap }}
@@ -203,10 +210,12 @@ spec:
203210 hostPath :
204211 path : " /sys"
205212 type : Directory
213+ {{- if typeIs "string" .Values.nvidiaDriverRoot }}
206214 - name : driver-root
207215 hostPath :
208- path : {{ clean ( join "/" ( list "/" .Values.nvidiaDriverRoot ) ) | quote }}
216+ path : {{ .Values.nvidiaDriverRoot | toYaml }}
209217 type : Directory
218+ {{- end }}
210219 {{- if $options.hasConfigMap }}
211220 - name : available-configs
212221 configMap :
Original file line number Diff line number Diff line change 109109 namespaceOverride : " "
110110 noTimestamp : null
111111 sleepInterval : null
112+ # custom env. needed (for example: LD_PRELOAD=/driver-root/usr/lib64/libnvidia-ml.so.1 when deviceListStrategy=cdi-cri)
113+ env : []
112114 securityContext :
113115 # privileged access is required for the gpu-feature-discovery to access the
114116 # vgpu info on a host.
You can’t perform that action at this time.
0 commit comments