File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ keywords:
99- finops
1010- monitoring
1111- opencost
12- version : 2.3.0
12+ version : 2.3.1
1313maintainers :
1414- name : jessegoodier
1515- name : toscott
Original file line number Diff line number Diff line change @@ -198,8 +198,17 @@ spec:
198198 name : {{ include "opencost.prometheus.secretname" . }}
199199 key : CLOUD_PROVIDER_API_KEY
200200 {{- end }}
201+ {{- if and (.Values.opencost.exporter.defaultClusterId) (not .Values.opencost.exporter.clusterIdConfigmap) }}
201202 - name : CLUSTER_ID
202203 value : {{ .Values.opencost.exporter.defaultClusterId | quote }}
204+ {{- end }}
205+ {{- if .Values.opencost.exporter.clusterIdConfigmap }}
206+ - name : CLUSTER_ID
207+ valueFrom :
208+ configMapKeyRef :
209+ name : {{ .Values.opencost.exporter.clusterIdConfigmap }}
210+ key : CLUSTER_ID
211+ {{- end }}
203212 {{- if .Values.opencost.exporter.aws.access_key_id }}
204213 - name : AWS_ACCESS_KEY_ID
205214 valueFrom :
Original file line number Diff line number Diff line change @@ -136,6 +136,9 @@ opencost:
136136 cloudProviderApiKey : " "
137137 # -- Default cluster ID to use if cluster_id is not set in Prometheus metrics.
138138 defaultClusterId : ' default-cluster'
139+ # -- If clusterIdConfigmap is defined, use user-generated ConfigMap with key CLUSTER_ID as default cluster ID.
140+ # -- This overrides the above defaultClusterId. Ensure the ConfigMap exists and contains the required CLUSTER_ID key.
141+ # clusterIdConfigmap: cluster-id-configmap
139142 image :
140143 # -- Exporter container image registry
141144 registry : ghcr.io
You can’t perform that action at this time.
0 commit comments