diff --git a/deployments/helm/nvidia-device-plugin/templates/daemonset-mps-control-daemon.yml b/deployments/helm/nvidia-device-plugin/templates/daemonset-mps-control-daemon.yml index 4d1fefdfb..da37aba6d 100644 --- a/deployments/helm/nvidia-device-plugin/templates/daemonset-mps-control-daemon.yml +++ b/deployments/helm/nvidia-device-plugin/templates/daemonset-mps-control-daemon.yml @@ -52,8 +52,13 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- if $options.hasConfigMap }} serviceAccountName: {{ include "nvidia-device-plugin.fullname" . }}-service-account + {{- if not .Values.mps.enableHostPID }} shareProcessNamespace: true {{- end }} + {{- end }} + {{- if .Values.mps.enableHostPID }} + hostPID: true + {{- end }} initContainers: - image: {{ include "nvidia-device-plugin.fullimage" . }} name: mps-control-daemon-mounts diff --git a/deployments/helm/nvidia-device-plugin/values.yaml b/deployments/helm/nvidia-device-plugin/values.yaml index b0c624295..147b9eac9 100644 --- a/deployments/helm/nvidia-device-plugin/values.yaml +++ b/deployments/helm/nvidia-device-plugin/values.yaml @@ -150,6 +150,12 @@ mps: # directories. # Pipe directories will be created at {{ mps.root }}/{{ .ResourceName }} root: "/run/nvidia/mps" + # enableHostPID when set to true provides the pod access to the host's PID namespace. + # hostPID is needed for the MPS server to find its own PID via /proc/self + # If the gpu driver is running in the host PID namespace, it is highly + # recommended that you enable this option. + # NOTE: HostPID and ShareProcessNamespace cannot both be set to true + enableHostPID: true cdi: