Skip to content

Commit a3678c9

Browse files
committed
fix: postgres connection string to use db name set in values
1 parent 996db06 commit a3678c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coder-observability/templates/_helpers.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ Create the name of the service account to use
6464
{{/* Postgres connector string */}}
6565
{{- define "postgres-connector-string" -}}
6666
{{- if .Values.global.postgres.password -}}
67-
postgresql://{{ .Values.global.postgres.username }}:{{ urlquery .Values.global.postgres.password }}@{{ .Values.global.postgres.hostname }}:{{ .Values.global.postgres.port }}/postgres?sslmode={{ .Values.global.postgres.sslmode }}
67+
postgresql://{{ .Values.global.postgres.username }}:{{ urlquery .Values.global.postgres.password }}@{{ .Values.global.postgres.hostname }}:{{ .Values.global.postgres.port }}/{{ .Values.global.postgres.database }}?sslmode={{ .Values.global.postgres.sslmode }}
6868
{{- else if .Values.global.postgres.mountSecret -}}
69-
postgresql://{{ .Values.global.postgres.username }}@{{ .Values.global.postgres.hostname }}:{{ .Values.global.postgres.port }}/postgres?sslmode={{ .Values.global.postgres.sslmode }}
69+
postgresql://{{ .Values.global.postgres.username }}@{{ .Values.global.postgres.hostname }}:{{ .Values.global.postgres.port }}/{{ .Values.global.postgres.database }}?sslmode={{ .Values.global.postgres.sslmode }}
7070
{{- else -}}
7171
{{ fail "either postgres.password or postgres.mountSecret must be defined" }}
7272
{{- end -}}

0 commit comments

Comments
 (0)