diff --git a/charts/opencost/Chart.yaml b/charts/opencost/Chart.yaml index 1b3adaf..4f3cfc4 100755 --- a/charts/opencost/Chart.yaml +++ b/charts/opencost/Chart.yaml @@ -9,7 +9,7 @@ keywords: - kubecost - opencost - monitoring -version: 1.20.3 +version: 1.21.0 maintainers: - name: mattray url: https://mattray.dev diff --git a/charts/opencost/README.md b/charts/opencost/README.md index 69bf005..9b4eeb4 100644 --- a/charts/opencost/README.md +++ b/charts/opencost/README.md @@ -2,7 +2,7 @@ OpenCost and OpenCost UI -![Version: 1.20.2](https://img.shields.io/badge/Version-1.20.2-informational?style=flat-square) +![Version: 1.21.0](https://img.shields.io/badge/Version-1.21.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.106.3](https://img.shields.io/badge/AppVersion-1.106.3-informational?style=flat-square) diff --git a/charts/opencost/templates/deployment.yaml b/charts/opencost/templates/deployment.yaml index 807bce3..c427c9e 100644 --- a/charts/opencost/templates/deployment.yaml +++ b/charts/opencost/templates/deployment.yaml @@ -83,7 +83,10 @@ spec: value: {{ include "opencost.prometheusServerEndpoint" . | quote }} {{- if .Values.opencost.exporter.cloudProviderApiKey }} - name: CLOUD_PROVIDER_API_KEY - value: {{ .Values.opencost.exporter.cloudProviderApiKey | quote }} + valueFrom: + secretKeyRef: + name: {{ include "opencost.prometheus.secretname" . }} + key: CLOUD_PROVIDER_API_KEY {{- end }} - name: CLUSTER_ID value: {{ .Values.opencost.exporter.defaultClusterId | quote }} diff --git a/charts/opencost/templates/secret.yaml b/charts/opencost/templates/secret.yaml index 5abbf70..e451637 100644 --- a/charts/opencost/templates/secret.yaml +++ b/charts/opencost/templates/secret.yaml @@ -1,4 +1,4 @@ -{{- if or .Values.opencost.prometheus.username .Values.opencost.prometheus.password .Values.opencost.prometheus.bearer_token .Values.opencost.exporter.aws.access_key_id }} +{{- if or .Values.opencost.prometheus.username .Values.opencost.prometheus.password .Values.opencost.prometheus.bearer_token .Values.opencost.exporter.aws.access_key_id .Values.opencost.exporter.cloudProviderApiKey }} apiVersion: v1 kind: Secret metadata: @@ -23,4 +23,7 @@ data: {{- if .Values.opencost.exporter.aws.access_key_id }} AWS_SECRET_ACCESS_KEY: {{ .Values.opencost.exporter.aws.secret_access_key | b64enc | quote }} {{- end }} + {{- if .Values.opencost.exporter.cloudProviderApiKey }} + CLOUD_PROVIDER_API_KEY: {{ .Values.opencost.exporter.cloudProviderApiKey | b64enc | quote }} + {{- end }} {{- end }}