Skip to content

Commit

Permalink
Adding value for Linode token via secret
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Kovacs <[email protected]>
  • Loading branch information
Richard Kovacs committed Aug 14, 2024
1 parent 6d6c2a7 commit 189a7c5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/opencost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.tokenSecret | string | `""` | Linode API token secret name |
| 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. |
Expand Down
7 changes: 7 additions & 0 deletions charts/opencost/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ spec:
name: {{ include "opencost.prometheus.secretname" . }}
key: AWS_SECRET_ACCESS_KEY
{{- end }}
{{- if .Values.opencost.exporter.linode.tokenSecret }}
- name: LINODE_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.opencost.exporter.linode.tokenSecret | quote }}
key: token
{{- end }}
{{- if and .Values.opencost.prometheus.username_key (or .Values.opencost.prometheus.username .Values.opencost.prometheus.existingSecretName) }}
- name: DB_BASIC_AUTH_USERNAME
valueFrom:
Expand Down
5 changes: 5 additions & 0 deletions charts/opencost/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ opencost:
secret_access_key: ""
# -- AWS secret key id
access_key_id: ""

linode:
# -- Linode API token secret name
tokenSecret: ""

# -- A list of volume mounts to be added to the pod
extraVolumeMounts: []
# -- List of additional environment variables to set in the container
Expand Down

0 comments on commit 189a7c5

Please sign in to comment.