Skip to content
Open
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 @@ -40,9 +40,9 @@ spec:
topologyKey: kubernetes.io/hostname
imagePullSecrets:
- name: {{ $.Values.imagePullSecrets.name }}
{{- if eq .node.type "cuda" }}
runtimeClassName: nvidia
{{- end }}
# {{- if eq .node.type "cuda" }}
# runtimeClassName: nvidia
# {{- end }}
Comment on lines +43 to +45
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While commenting out this block achieves the goal, a more idiomatic and maintainable approach for Helm charts is to use a feature flag in values.yaml. This makes the configuration explicit and allows toggling the behavior without changing the template code. This is preferable to leaving commented-out code in the template.

You could add a new value like nvidiaRuntimeClassEnabled to your values.yaml (setting it to false to keep it disabled) and use it here. This would make re-enabling it in the future cleaner.

      {{- if and (eq .node.type "cuda") .Values.nvidiaRuntimeClassEnabled }}
      runtimeClassName: nvidia
      {{- end }}

containers:
{{- if eq .node.type "cpu" }}
{{- include "bud-runtime-container.cpu-container" (dict "Values" $.Values "device" .node) | nindent 6 }}
Expand Down