Skip to content

Commit 6e6af78

Browse files
authored
Merge pull request #3 from jianxiaoguo/dev
chore(chart): modify the off-cluster database
2 parents 9436509 + 2940f3c commit 6e6af78

3 files changed

Lines changed: 5 additions & 13 deletions

File tree

charts/database/templates/database-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
- name: DATABASE_STORAGE
4141
value: "{{.Values.global.storage}}"
4242
- name: PGCTLTIMEOUT
43-
value: "{{.Values.postgres.timeout}}"
43+
value: "{{.Values.timeout}}"
4444
lifecycle:
4545
preStop:
4646
exec:

charts/database/templates/database-secret-creds.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,4 @@ metadata:
1010
data: {{ if eq .Values.global.database_location "on-cluster"}}
1111
user: {{ if .Values.username | default "" | ne "" }}{{ .Values.username | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}
1212
password: {{ if .Values.password | default "" | ne "" }}{{ .Values.password | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}{{ else if eq .Values.global.database_location "off-cluster"}}
13-
user: {{ .Values.postgres.username | b64enc }}
14-
password: {{ .Values.postgres.password | b64enc }}
15-
name: {{ .Values.postgres.name | b64enc }}
16-
host: {{ .Values.postgres.host | b64enc }}
17-
port: {{ .Values.postgres.port | b64enc }}{{ end }}
13+
url: {{ .Values.postgres.url | b64enc }}{{ end }}

charts/database/values.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@ image_tag: "canary"
44
image_registry: ""
55
# limits_cpu: "100m"
66
# limits_memory: "50Mi"
7+
timeout: "1200"
78
# The username and password to be used by the on-cluster database.
89
# If left empty they will be generated using randAlphaNum
910
username: ""
1011
password: ""
11-
12+
# Configure the following ONLY if using an off-cluster database.
1213
postgres:
13-
name: "database name"
14-
username: "database username"
15-
password: "database password"
16-
host: "database host"
17-
port: "database port"
18-
timeout: "1200"
14+
url: "postgres://USER:PASSWORD@HOST:PORT/NAME"

0 commit comments

Comments
 (0)