Skip to content

Commit 56693e8

Browse files
committed
cleanup postgres secrets
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
1 parent 6e68622 commit 56693e8

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

charts/opencloud/templates/postgres/deployment.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,23 @@ spec:
3030
- name: POSTGRES_DB
3131
value: {{ .Values.postgres.database | quote }}
3232
- name: POSTGRES_USER
33-
value: {{ .Values.postgres.user | quote }}
33+
valueFrom:
34+
secretKeyRef:
35+
name: {{- if .Values.postgres.existingSecret }}
36+
{{ .Values.postgres.existingSecret }}
37+
{{- else }}
38+
{{ include "opencloud.postgres.fullname" . }}
39+
{{- end }}
40+
key: username
3441
- name: POSTGRES_PASSWORD
35-
value: {{ .Values.postgres.password | quote }}
42+
valueFrom:
43+
secretKeyRef:
44+
name: {{- if .Values.postgres.existingSecret }}
45+
{{ .Values.postgres.existingSecret }}
46+
{{- else }}
47+
{{ include "opencloud.postgres.fullname" . }}
48+
{{- end }}
49+
key: password
3650
- name: PGDATA
3751
value: /var/lib/postgresql/data/pgdata
3852
ports:

charts/opencloud/templates/postgres/secret.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)