Add configurable env vars to health-monitoring-agent DaemonSets - #465
Open
nitishsaik wants to merge 1 commit into
Open
nitishsaik wants to merge 1 commit into
nitishsaik wants to merge 1 commit into
Conversation
Introduce a .Values.env range block in both the nvidia and non-nvidia HMA DaemonSets so custom environment variables can be injected via values, rendered before the built-in NODE_NAME/NODE_IP fieldRef vars. Add env: [] default in values.yaml.
nitishsaik
requested a deployment
to
manual-approval
September 18, 2026 22:13 — with
GitHub Actions
Waiting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a
.Values.envrange block in both the nvidia and non-nvidia HMA DaemonSets so custom environment variables can be injected via values, rendered before thebuilt-in
NODE_NAME/NODE_IPfieldRef vars. Addenv: []default in values.yaml.What's changing and why?
The
health-monitoring-agentchart previously hardcoded the containerenvlist in both DaemonSets (health-monitoring-agentandhealth-monitoring-agent-non-nvidia), so there was no way to inject additional environment variables without editing the template. This change adds a{{- range .Values.env }}block to both DaemonSets, allowing custom env vars to be supplied through Helm values. The custom vars render first, followed by the existing built-inNODE_NAME/NODE_IPfieldRef variables (and, on the non-nvidia DaemonSet,NVIDIA_VISIBLE_DEVICES/NVIDIA_DRIVER_CAPABILITIES). A default ofenv: []is added tovalues.yamlso the chart's behavior is unchanged unless the user explicitly sets values.Before/After UX
Before:
Container env was fixed to
NODE_NAMEandNODE_IP(plus the twoNVIDIA_*vars on the non-nvidia DaemonSet). Adding an env var required editing the templatedirectly.
After:
Users can inject env vars via values, e.g.:
yaml env: - name: FOO value: bar - name: BAZ value: qux Rendered result (both DaemonSets):
yaml env: - name: FOO value: "bar" - name: BAZ value: "qux" - name: NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName - name: NODE_IP valueFrom: fieldRef: fieldPath: status.hostIP With no
envset (the default[]), output is identical to before — no leftover template artifacts.How was this change tested?
Rendered the chart locally with Helm 4.3.0:
helm templatewith default (empty)env: renders cleanly, output matches the pre-change template with no artifacts.helm template --set env[0].name=FOO --set env[0].value=bar --set env[1].name=BAZ --set env[1].value=qux: confirmed custom vars render first (quoted), followed byNODE_NAME/NODE_IP, in both DaemonSets.helm lint .: passed (0 charts failed).Are unit tests added?
No. This chart has no existing unit test harness (e.g.,
helm-unittest); the change was verified viahelm template/helm lintrendering checks instead.Are integration tests added?
No. This is a templating-only change to a Helm chart with no runtime logic; validated through Helm rendering as above.
Reviewer Guidelines
One of the following must be true:
helm template(empty + populated env) andhelm lint(0 failures)