Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ spec:
- name: kubelet-device-plugins-dir
mountPath: /var/lib/kubelet/device-plugins
{{- if typeIs "string" .Values.nvidiaDriverRoot }}
# We always mount the driver root at /driver-root in the container.
# We mount the driver root at /driver-root in the container.
# This is required for CDI detection to work correctly.
- name: driver-root
mountPath: /driver-root
Expand Down Expand Up @@ -242,12 +242,12 @@ spec:
- name: mps-shm
hostPath:
path: {{ .Values.mps.root }}/shm
{{- if typeIs "string" .Values.nvidiaDriverRoot }}
{{- if typeIs "string" .Values.nvidiaDriverRoot }}
- name: driver-root
hostPath:
path: {{ .Values.nvidiaDriverRoot }}
path: {{ .Values.nvidiaDriverRoot | toYaml }}
type: Directory
{{- end }}
{{- end }}
- name: cdi-root
hostPath:
path: /var/run/cdi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,18 @@ spec:
- name: DEVICE_DISCOVERY_STRATEGY
value: {{ .Values.deviceDiscoveryStrategy }}
{{- end }}
{{- .Values.gfd.env | toYaml | nindent 10 }}
securityContext:
{{- include "gpu-feature-discovery.securityContext" . | nindent 10 }}
volumeMounts:
- name: output-dir
mountPath: "/etc/kubernetes/node-feature-discovery/features.d"
{{- if typeIs "string" .Values.nvidiaDriverRoot }}
# We mount the driver root at /driver-root in the container.
- name: driver-root
mountPath: /driver-root
readOnly: true
{{- end }}
- name: host-sys
mountPath: "/sys"
{{- if $options.hasConfigMap }}
Expand All @@ -203,10 +210,12 @@ spec:
hostPath:
path: "/sys"
type: Directory
{{- if typeIs "string" .Values.nvidiaDriverRoot }}
- name: driver-root
hostPath:
path: {{ clean ( join "/" ( list "/" .Values.nvidiaDriverRoot ) ) | quote }}
path: {{ .Values.nvidiaDriverRoot | toYaml }}
type: Directory
{{- end }}
{{- if $options.hasConfigMap }}
- name: available-configs
configMap:
Expand Down
2 changes: 2 additions & 0 deletions deployments/helm/nvidia-device-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ gfd:
namespaceOverride: ""
noTimestamp: null
sleepInterval: null
# custom env. needed (for example: LD_PRELOAD=/driver-root/usr/lib64/libnvidia-ml.so.1 when deviceListStrategy=cdi-cri)
env: []
securityContext:
# privileged access is required for the gpu-feature-discovery to access the
# vgpu info on a host.
Expand Down