diff --git a/charts/gpu-metrics-exporter/templates/daemonset.yaml b/charts/gpu-metrics-exporter/templates/daemonset.yaml index cc6f499..3c58612 100644 --- a/charts/gpu-metrics-exporter/templates/daemonset.yaml +++ b/charts/gpu-metrics-exporter/templates/daemonset.yaml @@ -74,19 +74,19 @@ spec: envFrom: - configMapRef: name: {{- include "gpu-metrics-exporter.config-map" . | indent 1}} - {{- if .Values.dcgmExporter.enabled }} env: - - name: "DCGM_HOST" - value: "localhost" - name: "NODE_NAME" valueFrom: fieldRef: fieldPath: spec.nodeName - name: "API_KEY" valueFrom: - secretKeyRef: - name: {{ include "gpu-metrics-exporter.fullname" . }} - key: API_KEY + secretKeyRef: + name: {{ include "gpu-metrics-exporter.fullname" . }} + key: API_KEY + {{- if .Values.dcgmExporter.enabled }} + - name: "DCGM_HOST" + value: "localhost" {{- end }} resources: {{- toYaml .Values.gpuMetricsExporter.resources | nindent 12 }} diff --git a/charts/gpu-metrics-exporter/templates/gpu-exporter-configmap.yaml b/charts/gpu-metrics-exporter/templates/gpu-exporter-configmap.yaml index f11a038..8351b1b 100644 --- a/charts/gpu-metrics-exporter/templates/gpu-exporter-configmap.yaml +++ b/charts/gpu-metrics-exporter/templates/gpu-exporter-configmap.yaml @@ -4,6 +4,6 @@ metadata: name: {{- include "gpu-metrics-exporter.config-map" . | indent 1}} data: {{- with .Values.gpuMetricsExporter.config }} - CLUSTER_ID: "{{ .Values.castai.clusterId | default .CLUSTER_ID }}" + CLUSTER_ID: "{{ $.Values.castai.clusterId | default .CLUSTER_ID }}" {{- toYaml (omit . "CLUSTER_ID") | nindent 2 }} {{- end }}