Skip to content

Commit 094f2f7

Browse files
committed
chore(charts): Nn secret is generated during off-cluster
1 parent 869ca28 commit 094f2f7

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if eq .Values.global.database_location "on-cluster"}}
12
apiVersion: v1
23
kind: Secret
34
metadata:
@@ -7,7 +8,7 @@ metadata:
78
heritage: drycc
89
annotations:
910
"helm.sh/hook": pre-install
10-
data: {{ if eq .Values.global.database_location "on-cluster"}}
11+
data:
1112
user: {{ if .Values.username | default "" | ne "" }}{{ .Values.username | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}
12-
password: {{ if .Values.password | default "" | ne "" }}{{ .Values.password | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}{{ else if eq .Values.global.database_location "off-cluster"}}
13-
url: {{ .Values.postgres.url | b64enc }}{{ end }}
13+
password: {{ if .Values.password | default "" | ne "" }}{{ .Values.password | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}
14+
{{ end }}

charts/database/values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ timeout: "1200"
99
# If left empty they will be generated using randAlphaNum
1010
username: ""
1111
password: ""
12-
# Configure the following ONLY if using an off-cluster database.
13-
postgres:
14-
url: "postgres://USER:PASSWORD@HOST:PORT/NAME"

0 commit comments

Comments
 (0)