Skip to content

Commit ca8f930

Browse files
authoredFeb 10, 2025··
[bitnami/postgresql] use adminPassword for metrics user when custom user is not set on primary (#31840)
1 parent 5bcbebf commit ca8f930

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed
 

‎bitnami/postgresql/CHANGELOG.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# Changelog
22

3-
## 16.4.6 (2025-02-02)
3+
## 16.4.7 (2025-02-09)
44

5-
* [bitnami/postgresql] Release 16.4.6 ([#31702](https://github.com/bitnami/charts/pull/31702))
5+
* [bitnami/postgresql] use adminPassword for metrics user when custom user is not set on primary ([#31840](https://github.com/bitnami/charts/pull/31840))
6+
7+
## <small>16.4.6 (2025-02-03)</small>
8+
9+
* [bitnami/postgresql] Release 16.4.6 (#31702) ([0a0a5d3](https://github.com/bitnami/charts/commit/0a0a5d33825e523f8fa780bdec97b685fd74d0e3)), closes [#31702](https://github.com/bitnami/charts/issues/31702)
10+
* Update copyright year (#31682) ([e9f02f5](https://github.com/bitnami/charts/commit/e9f02f5007068751f7eb2270fece811e685c99b6)), closes [#31682](https://github.com/bitnami/charts/issues/31682)
611

712
## <small>16.4.5 (2025-01-20)</small>
813

‎bitnami/postgresql/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ maintainers:
3535
name: postgresql
3636
sources:
3737
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
38-
version: 16.4.6
38+
version: 16.4.7

‎bitnami/postgresql/templates/primary/statefulset.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -539,16 +539,16 @@ spec:
539539
value: {{ printf "127.0.0.1:%d/postgres?sslmode=disable" (int (include "postgresql.v1.service.port" .)) }}
540540
{{- if .Values.auth.usePasswordFiles }}
541541
- name: DATA_SOURCE_PASS_FILE
542-
value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }}
542+
value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include (ternary "postgresql.v1.adminPasswordKey" "postgresql.v1.userPasswordKey" (empty $customUser)) .) }}
543543
{{- else }}
544544
- name: DATA_SOURCE_PASS
545545
valueFrom:
546546
secretKeyRef:
547547
name: {{ include "postgresql.v1.secretName" . }}
548-
key: {{ include "postgresql.v1.adminPasswordKey" . }}
548+
key: {{ include (ternary "postgresql.v1.adminPasswordKey" "postgresql.v1.userPasswordKey" (empty $customUser)) . }}
549549
{{- end }}
550550
- name: DATA_SOURCE_USER
551-
value: "postgres"
551+
value: {{ default "postgres" $customUser | quote }}
552552
{{- if .Values.metrics.extraEnvVars }}
553553
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }}
554554
{{- end }}

0 commit comments

Comments
 (0)
Please sign in to comment.