diff --git a/coder-observability/templates/_helpers.tpl b/coder-observability/templates/_helpers.tpl index a182b3d..12ab859 100644 --- a/coder-observability/templates/_helpers.tpl +++ b/coder-observability/templates/_helpers.tpl @@ -64,9 +64,9 @@ Create the name of the service account to use {{/* Postgres connector string */}} {{- define "postgres-connector-string" -}} {{- if .Values.global.postgres.password -}} -postgresql://{{ .Values.global.postgres.username }}:{{ urlquery .Values.global.postgres.password }}@{{ .Values.global.postgres.hostname }}:{{ .Values.global.postgres.port }}/postgres?sslmode={{ .Values.global.postgres.sslmode }} +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 }} {{- else if .Values.global.postgres.mountSecret -}} -postgresql://{{ .Values.global.postgres.username }}@{{ .Values.global.postgres.hostname }}:{{ .Values.global.postgres.port }}/postgres?sslmode={{ .Values.global.postgres.sslmode }} +postgresql://{{ .Values.global.postgres.username }}@{{ .Values.global.postgres.hostname }}:{{ .Values.global.postgres.port }}/{{ .Values.global.postgres.database }}?sslmode={{ .Values.global.postgres.sslmode }} {{- else -}} {{ fail "either postgres.password or postgres.mountSecret must be defined" }} {{- end -}} diff --git a/compiled/resources.yaml b/compiled/resources.yaml index 6f4518e..dea0d3e 100644 --- a/compiled/resources.yaml +++ b/compiled/resources.yaml @@ -994,7 +994,7 @@ data: global: target: name: postgres - data_source_name: 'postgresql://coder@localhost:5432/postgres?sslmode=disable' + data_source_name: 'postgresql://coder@localhost:5432/coder?sslmode=disable' collectors: - notify collectors: @@ -12215,7 +12215,7 @@ spec: name: exporter env: - name: DATA_SOURCE_NAME - value: 'postgresql://coder@localhost:5432/postgres?sslmode=disable' + value: 'postgresql://coder@localhost:5432/coder?sslmode=disable' envFrom: - secretRef: name: secret-postgres @@ -12270,7 +12270,7 @@ spec: metadata: annotations: prometheus.io/scrape: 'true' - checksum/config: e12c0044ef2cab3438ffdc8f5e16c24c5acf5ee36dcc8bee77294f27e53ce4a2 + checksum/config: 71bb9e7579b6e138ae28c623aa29d72025be00387da6c1b8dd5aa168c96ca1e0 labels: app: sql-exporter app.kubernetes.io/name: "database-stats"