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 @@ -135,8 +135,10 @@ spec:
name: nvidia-device-plugin-ctr
command: ["nvidia-device-plugin"]
env:
{{- if .Values.mps.enabled }}
- name: MPS_ROOT
value: {{ .Values.mps.root }}
{{- end }}
{{- if typeIs "string" .Values.migStrategy }}
- name: MIG_STRATEGY
value: {{ .Values.migStrategy }}
Expand Down Expand Up @@ -205,13 +207,15 @@ spec:
mountPath: /driver-root
readOnly: true
{{- end }}
{{- if .Values.mps.enabled }}
# The MPS /dev/shm is needed to allow for MPS daemon health-checking.
- name: mps-shm
mountPath: /dev/shm
- name: mps-root
mountPath: /mps
- name: cdi-root
mountPath: /var/run/cdi
{{- end }}
{{- if $options.hasConfigMap }}
- name: available-configs
mountPath: /available-configs
Expand All @@ -226,22 +230,24 @@ spec:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/device-plugins
{{- if .Values.mps.enabled }}
- name: mps-root
hostPath:
path: {{ .Values.mps.root }}
type: DirectoryOrCreate
- name: mps-shm
hostPath:
path: {{ .Values.mps.root }}/shm
- name: cdi-root
hostPath:
path: /var/run/cdi
type: DirectoryOrCreate
{{- end }}
{{- if typeIs "string" .Values.nvidiaDriverRoot }}
- name: driver-root
hostPath:
path: {{ .Values.nvidiaDriverRoot }}
{{- end }}
- name: cdi-root
hostPath:
path: /var/run/cdi
type: DirectoryOrCreate
{{- if $options.hasConfigMap }}
- name: available-configs
configMap:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.devicePlugin.enabled }}
{{- if and .Values.devicePlugin.enabled .Values.mps.enabled }}
---
{{- $options := (include "nvidia-device-plugin.options" . | fromJson) }}
{{- $configMapName := (include "nvidia-device-plugin.configMapName" .) | trim }}
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 @@ -145,6 +145,8 @@ nfd:
- vendor

mps:
# Enable MPS DaemonSet (user still needs to activate MPS configuration by labeling a node)
enabled: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a user, I think at a minimum there needs to be comments placed above this line to explain its use. If I see this in a values file, I may interpret mps.enabled: true to mean I, as a user, want MPS enabled right out of the gate. But that's not what this does. When set to false MPS will never work even if I later activate an MPS configuration by labeling a node.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment clarifying this

# root specifies the location where files and folders for managing MPS will
# be created. This includes a daemon-specific /dev/shm and pipe and log
# directories.
Expand Down