Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding value for Linode token via secret #224

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -146,6 +146,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 @@ -213,6 +213,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