diff --git a/deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml b/deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml index 1fdd0b6f4..5d9c3b579 100644 --- a/deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml +++ b/deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml @@ -196,7 +196,7 @@ spec: securityContext: {{- include "nvidia-device-plugin.securityContext" . | nindent 10 }} volumeMounts: - - name: device-plugin + - 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. @@ -223,9 +223,10 @@ spec: {{- toYaml . | nindent 10 }} {{- end }} volumes: - - name: device-plugin + - name: kubelet-device-plugins-dir hostPath: path: /var/lib/kubelet/device-plugins + type: Directory - name: mps-root hostPath: path: {{ .Values.mps.root }} @@ -233,10 +234,11 @@ 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 }} + type: Directory {{- end }} - name: cdi-root hostPath: diff --git a/deployments/helm/nvidia-device-plugin/templates/daemonset-gfd.yml b/deployments/helm/nvidia-device-plugin/templates/daemonset-gfd.yml index 197f12b7a..09f9dfe39 100644 --- a/deployments/helm/nvidia-device-plugin/templates/daemonset-gfd.yml +++ b/deployments/helm/nvidia-device-plugin/templates/daemonset-gfd.yml @@ -198,9 +198,11 @@ spec: - name: output-dir hostPath: path: "/etc/kubernetes/node-feature-discovery/features.d" + type: DirectoryOrCreate - name: host-sys hostPath: path: "/sys" + type: Directory - name: driver-root hostPath: path: {{ clean ( join "/" ( list "/" .Values.nvidiaDriverRoot ) ) | quote }} diff --git a/deployments/static/gpu-feature-discovery-daemonset-with-mig-mixed.yaml b/deployments/static/gpu-feature-discovery-daemonset-with-mig-mixed.yaml index a170d9625..c8c9fb828 100644 --- a/deployments/static/gpu-feature-discovery-daemonset-with-mig-mixed.yaml +++ b/deployments/static/gpu-feature-discovery-daemonset-with-mig-mixed.yaml @@ -60,6 +60,8 @@ spec: - name: output-dir hostPath: path: "/etc/kubernetes/node-feature-discovery/features.d" + type: DirectoryOrCreate - name: host-sys hostPath: path: "/sys" + type: Directory diff --git a/deployments/static/gpu-feature-discovery-daemonset-with-mig-single.yaml b/deployments/static/gpu-feature-discovery-daemonset-with-mig-single.yaml index b9fbed84c..75fed3970 100644 --- a/deployments/static/gpu-feature-discovery-daemonset-with-mig-single.yaml +++ b/deployments/static/gpu-feature-discovery-daemonset-with-mig-single.yaml @@ -60,6 +60,8 @@ spec: - name: output-dir hostPath: path: "/etc/kubernetes/node-feature-discovery/features.d" + type: DirectoryOrCreate - name: host-sys hostPath: path: "/sys" + type: Directory diff --git a/deployments/static/gpu-feature-discovery-daemonset.yaml b/deployments/static/gpu-feature-discovery-daemonset.yaml index 7bcbd3363..f88bcdcb8 100644 --- a/deployments/static/gpu-feature-discovery-daemonset.yaml +++ b/deployments/static/gpu-feature-discovery-daemonset.yaml @@ -58,6 +58,8 @@ spec: - name: output-dir hostPath: path: "/etc/kubernetes/node-feature-discovery/features.d" + type: DirectoryOrCreate - name: host-sys hostPath: path: "/sys" + type: Directory diff --git a/deployments/static/gpu-feature-discovery-job.yaml.template b/deployments/static/gpu-feature-discovery-job.yaml.template index 8c6c59359..74b34f5dc 100644 --- a/deployments/static/gpu-feature-discovery-job.yaml.template +++ b/deployments/static/gpu-feature-discovery-job.yaml.template @@ -32,7 +32,9 @@ spec: - name: output-dir hostPath: path: "/etc/kubernetes/node-feature-discovery/features.d" + type: DirectoryOrCreate - name: host-sys hostPath: path: "/sys" + type: Directory restartPolicy: Never diff --git a/deployments/static/nvidia-device-plugin-compat-with-cpumanager.yml b/deployments/static/nvidia-device-plugin-compat-with-cpumanager.yml index 9bcf12cea..4a54165f2 100644 --- a/deployments/static/nvidia-device-plugin-compat-with-cpumanager.yml +++ b/deployments/static/nvidia-device-plugin-compat-with-cpumanager.yml @@ -48,9 +48,10 @@ spec: securityContext: privileged: true volumeMounts: - - name: device-plugin + - name: kubelet-device-plugins-dir mountPath: /var/lib/kubelet/device-plugins volumes: - - name: device-plugin + - name: kubelet-device-plugins-dir hostPath: path: /var/lib/kubelet/device-plugins + type: Directory diff --git a/deployments/static/nvidia-device-plugin-privileged-with-service-account.yml b/deployments/static/nvidia-device-plugin-privileged-with-service-account.yml index ced5d6c41..49758d0fa 100644 --- a/deployments/static/nvidia-device-plugin-privileged-with-service-account.yml +++ b/deployments/static/nvidia-device-plugin-privileged-with-service-account.yml @@ -129,10 +129,11 @@ spec: securityContext: privileged: true volumeMounts: - - name: device-plugin + - name: kubelet-device-plugins-dir mountPath: /var/lib/kubelet/device-plugins serviceAccountName: nvidia-device-plugin volumes: - - name: device-plugin + - name: kubelet-device-plugins-dir hostPath: path: /var/lib/kubelet/device-plugins + type: DirectoryOrCreate diff --git a/deployments/static/nvidia-device-plugin.yml b/deployments/static/nvidia-device-plugin.yml index 839ab4552..b96264dc0 100644 --- a/deployments/static/nvidia-device-plugin.yml +++ b/deployments/static/nvidia-device-plugin.yml @@ -48,9 +48,10 @@ spec: capabilities: drop: ["ALL"] volumeMounts: - - name: device-plugin + - name: kubelet-device-plugins-dir mountPath: /var/lib/kubelet/device-plugins volumes: - - name: device-plugin + - name: kubelet-device-plugins-dir hostPath: path: /var/lib/kubelet/device-plugins + type: Directory