Skip to content

Commit

Permalink
[gpu-metrics-exporter] add support for clusterIDSecretRef #622 (#662)
Browse files Browse the repository at this point in the history
* add support for clusterIDSecretRef

* correct lint

* correct lint

* drop eks values

* add eks provider value
  • Loading branch information
kisahm authored Jan 10, 2025
1 parent 673b2c6 commit 1bb52e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/gpu-metrics-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: gpu-metrics-exporter
description: A Helm chart for Kubernetes
type: application
version: 0.1.17
version: 0.1.18
appVersion: "0.1.17"
10 changes: 10 additions & 0 deletions charts/gpu-metrics-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ spec:
secretKeyRef:
name: {{ include "gpu-metrics-exporter.fullname" . }}
key: API_KEY
{{- if .Values.castai.clusterIdSecretKeyRef.name }}
{{- if ne .Values.castai.clusterId "" }}
{{- fail "clusterId and clusterIdSecretKeyRef are mutually exclusive" }}
{{- end }}
- name: "CLUSTER_ID"
valueFrom:
secretKeyRef:
name: {{ .Values.castai.clusterIdSecretKeyRef.name }}
key: {{ .Values.castai.clusterIdSecretKeyRef.key }}
{{- end }}
{{- if .Values.dcgmExporter.enabled }}
- name: "DCGM_HOST"
value: "localhost"
Expand Down
8 changes: 6 additions & 2 deletions charts/gpu-metrics-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
provider: "" # gke | eks | aks
# possible provider values: gke | eks | aks
provider: "eks"
imagePullSecrets: []

serviceAccount:
Expand All @@ -9,6 +10,9 @@ serviceAccount:
castai:
apiKey: ""
clusterId: ""
clusterIdSecretKeyRef:
name: ""
key: "CLUSTER_ID"

gpuMetricsExporter:
image:
Expand Down Expand Up @@ -53,4 +57,4 @@ migrate:
image:
repository: alpine/k8s
pullPolicy: IfNotPresent
tag: 1.31.0
tag: 1.31.0

0 comments on commit 1bb52e7

Please sign in to comment.