Use Secrets for passwords and tokens

Signed-off-by: Thomas Matysik <thomas@matysik.co.nz>
This commit is contained in:
Thomas Matysik 2020-05-06 15:07:11 +12:00 committed by Charlie Drage
parent 7340a6278a
commit 5f3dd8a292
9 changed files with 220 additions and 38 deletions

View file

@ -0,0 +1,16 @@
{{- if .Values.externalDB -}}
{{- if (not .Values.externalDB.secretName) -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "db-secret-name" . }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
type: Opaque
data:
{{ .Values.externalDB.passwordKey }}: {{ .Values.externalDB.dbPassword | b64enc }}
{{- end -}}
{{- end }}