Skip to content

Commit

Permalink
Update way of providing secret with key
Browse files Browse the repository at this point in the history
  • Loading branch information
Whyeasy committed Jun 19, 2020
1 parent 1274e46 commit b329835
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/stackdriver-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: stackdriver-exporter
description: A slim Helm Chart to deploy a GCP Stackdriver exporter, with BYO SA and Secrets.
type: application
version: 0.1.0
version: 0.1.1
appVersion: 0.9.1
4 changes: 2 additions & 2 deletions charts/stackdriver-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ stackdriver-exporter
====================
A slim Helm Chart to deploy a GCP Stackdriver exporter, with BYO SA and Secrets.

Current chart version is `0.1.0`
Current chart version is `0.1.1`



Expand Down Expand Up @@ -37,6 +37,6 @@ Current chart version is `0.1.0`
| stackdriver.metrics.offset | string | `"0s"` | Set off set of data to retrieve, may be needed for some metrics. |
| stackdriver.metrics.typePrefixes | string | `"compute.googleapis.com/instance/cpu"` | Comma seperated list of metrics to query in stackdriver. |
| stackdriver.projectId | string | `""` | Define which google Project to query for stackdriver metrics. |
| stackdriver.serivceAccount.items | list | `[]` | |
| stackdriver.serivceAccount.key | string | `""` | |
| stackdriver.serivceAccount.secret | string | `"sd-account"` | |
| tolerations | list | `[]` | Adding any tolerations to your deployment. |
7 changes: 4 additions & 3 deletions charts/stackdriver-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
{{- if .Values.stackdriver.secretKey}}
value: /etc/secrets/service-account/{{ .Values.stackdriver.secretKey}}
{{- else }}
value: /etc/secrets/service-account/credentials.json
{{- end}}
- name: STACKDRIVER_EXPORTER_GOOGLE_PROJECT_ID
value: {{ .Values.stackdriver.projectId | quote }}
- name: STACKDRIVER_EXPORTER_MONITORING_METRICS_TYPE_PREFIXES
Expand Down Expand Up @@ -78,9 +82,6 @@ spec:
- name: service-account
secret:
secretName: {{ .Values.stackdriver.serivceAccount.secret }}
{{- if .Values.stackdriver.serivceAccount.items }}
items: {{- toYaml .Values.stackdriver.serivceAccount.items | nindent 14 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
7 changes: 3 additions & 4 deletions charts/stackdriver-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ stackdriver:
serivceAccount:
# stackdriver.serviceAccount.secret -- Define the secret name which stores the SA credentials.
secret: "sd-account"
# stackdriver.serviceAccount.items -- Needed when custom data keys are used. Path should be credentials.json!
items: []
# - key: SD_CONFIG
# path: credentials.json
# stackdriver.serviceAccount.items -- Needed when custom data keys are used.
key: ""
# SD_CONFIG
metrics:
# stackdriver.metrics.typePrefixes -- Comma seperated list of metrics to query in stackdriver.
typePrefixes: compute.googleapis.com/instance/cpu
Expand Down

0 comments on commit b329835

Please sign in to comment.