From 2b9cb10f1dc4dfe0f9ab497c20c95a4e39de2332 Mon Sep 17 00:00:00 2001 From: nitishsaik Date: Fri, 18 Sep 2026 13:57:13 -0700 Subject: [PATCH] Add configurable env vars to health-monitoring-agent DaemonSets 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. --- .../templates/health-monitoring-agent.yaml | 8 ++++++++ .../charts/health-monitoring-agent/values.yaml | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/helm_chart/HyperPodHelmChart/charts/health-monitoring-agent/templates/health-monitoring-agent.yaml b/helm_chart/HyperPodHelmChart/charts/health-monitoring-agent/templates/health-monitoring-agent.yaml index 2d5a430a..d32398b7 100644 --- a/helm_chart/HyperPodHelmChart/charts/health-monitoring-agent/templates/health-monitoring-agent.yaml +++ b/helm_chart/HyperPodHelmChart/charts/health-monitoring-agent/templates/health-monitoring-agent.yaml @@ -140,6 +140,10 @@ spec: runAsUser: 1000 runAsGroup: 2000 env: + {{- range .Values.env }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end }} - name: NODE_NAME valueFrom: fieldRef: @@ -228,6 +232,10 @@ spec: runAsUser: 1000 runAsGroup: 2000 env: + {{- range .Values.env }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end }} - name: NODE_NAME valueFrom: fieldRef: diff --git a/helm_chart/HyperPodHelmChart/charts/health-monitoring-agent/values.yaml b/helm_chart/HyperPodHelmChart/charts/health-monitoring-agent/values.yaml index c666b40a..a3362c1f 100644 --- a/helm_chart/HyperPodHelmChart/charts/health-monitoring-agent/values.yaml +++ b/helm_chart/HyperPodHelmChart/charts/health-monitoring-agent/values.yaml @@ -31,6 +31,11 @@ hmaimage: "" # Enable debug output for region selection process debug: true +# Additional environment variables to inject into the HMA containers. +# Each entry must have a `name` and a `value`. Rendered before the +# built-in NODE_NAME / NODE_IP fieldRef variables. +env: [] + # PriorityClass for the HMA DaemonSet pods. # system-node-critical ensures HMA is the last pod evicted under node pressure # (e.g. DiskPressure), preventing loss of health monitoring. See P438078245.