diff --git a/charts/opencost/README.md b/charts/opencost/README.md index 394add2..5674cff 100644 --- a/charts/opencost/README.md +++ b/charts/opencost/README.md @@ -59,6 +59,7 @@ $ helm install opencost opencost/opencost | opencost.exporter.apiPort | int | `9003` | | | opencost.exporter.aws.access_key_id | string | `""` | AWS secret key id | | opencost.exporter.aws.secret_access_key | string | `""` | AWS secret access key | +| opencost.exporter.linode.token | string | `""` | Linode API token | | opencost.exporter.cloudProviderApiKey | string | `""` | The GCP Pricing API requires a key. This is supplied just for evaluation. | | opencost.exporter.csv_path | string | `""` | | | opencost.exporter.defaultClusterId | string | `"default-cluster"` | Default cluster ID to use if cluster_id is not set in Prometheus metrics. | diff --git a/charts/opencost/templates/deployment.yaml b/charts/opencost/templates/deployment.yaml index efa828e..28c6b3e 100644 --- a/charts/opencost/templates/deployment.yaml +++ b/charts/opencost/templates/deployment.yaml @@ -147,6 +147,13 @@ spec: name: {{ include "opencost.prometheus.secretname" . }} key: AWS_SECRET_ACCESS_KEY {{- end }} + {{- if .Values.opencost.exporter.linode.token }} + - name: LINODE_TOKEN + valueFrom: + secretKeyRef: + name: {{ include "opencost.prometheus.secretname" . }} + key: LINODE_TOKEN + {{- end }} {{- if and .Values.opencost.prometheus.username_key (or .Values.opencost.prometheus.username .Values.opencost.prometheus.existingSecretName) }} - name: DB_BASIC_AUTH_USERNAME valueFrom: diff --git a/charts/opencost/templates/secret.yaml b/charts/opencost/templates/secret.yaml index 214f649..45eea24 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 .Values.opencost.exporter.cloudProviderApiKey }} +{{- 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.linode.token .Values.opencost.exporter.cloudProviderApiKey }} apiVersion: v1 kind: Secret metadata: @@ -24,6 +24,9 @@ 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.linode.token }} + LINODE_TOKEN: {{ .Values.opencost.exporter.linode.token | b64enc | quote }} + {{- end }} {{- if .Values.opencost.exporter.cloudProviderApiKey }} CLOUD_PROVIDER_API_KEY: {{ .Values.opencost.exporter.cloudProviderApiKey | b64enc | quote }} {{- end }} diff --git a/charts/opencost/values.yaml b/charts/opencost/values.yaml index 920395b..be69c0e 100644 --- a/charts/opencost/values.yaml +++ b/charts/opencost/values.yaml @@ -213,6 +213,11 @@ opencost: secret_access_key: "" # -- AWS secret key id access_key_id: "" + + linode: + # -- Linode API token + token: "" + # -- A list of volume mounts to be added to the pod extraVolumeMounts: [] # -- List of additional environment variables to set in the container