support for GOOGLE_APPLICATION_CREDENTIALS

pull/144/head
Alexander Krieg 2018-02-22 15:49:11 +01:00
parent 15a3f4dc50
commit 553af51f16
3 changed files with 32 additions and 0 deletions

View File

@ -21,7 +21,15 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/keel"]
volumeMounts:
- name: google
mountPath: "/google"
readOnly: true
env:
{{- if .Values.googleApplicationCredentials }}
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /google/google-application-credentials.json
{{- end }}
{{- if .Values.polling.enabled }}
# Enable polling
- name: POLL
@ -104,3 +112,9 @@ spec:
{{- end }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- if .Values.googleApplicationCredentials }}
volumes:
- name: google
secret:
secretName: {{ template "name" . }}-google
{{- end }}

View File

@ -0,0 +1,15 @@
{{- if .Values.googleApplicationCredentials }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "name" . }}-google
namespace: kube-system
labels:
app: {{ template "name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
google-application-credentials.json: {{ .Values.googleApplicationCredentials | b64enc | quote }}
{{- end }}

View File

@ -99,3 +99,6 @@ resources:
# NodeSelector
nodeSelector: {}
# json of service account
# googleApplicationCredentials: