[bitnami/postgresql] use adminPassword for metrics user when custom user is not set (#30720)

* use adminPassword for metrics user when custom user is not set

As the default value of DATA_SOURCE_USER is postgres, its value must be admin password if custom user is not set.

Signed-off-by: Songi Park <songee430@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

---------

Signed-off-by: Songi Park <songee430@gmail.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
song2park
2024-12-03 18:55:46 +09:00
committed by GitHub
parent c163f689ad
commit 8f4bc7b46b
3 changed files with 9 additions and 5 deletions

View File

@@ -1,8 +1,12 @@
# Changelog
## 16.2.3 (2024-11-27)
## 16.2.4 (2024-12-03)
* [bitnami/postgresql] Release 16.2.3 ([#30645](https://github.com/bitnami/charts/pull/30645))
* [bitnami/postgresql] use adminPassword for metrics user when custom user is not set ([#30720](https://github.com/bitnami/charts/pull/30720))
## <small>16.2.3 (2024-11-28)</small>
* [bitnami/postgresql] Release 16.2.3 (#30645) ([22a4c51](https://github.com/bitnami/charts/commit/22a4c51dc3b85e73b017cb6f6c73e15e6e4b811c)), closes [#30645](https://github.com/bitnami/charts/issues/30645)
## <small>16.2.2 (2024-11-21)</small>

View File

@@ -35,4 +35,4 @@ maintainers:
name: postgresql
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
version: 16.2.3
version: 16.2.4

View File

@@ -446,13 +446,13 @@ spec:
value: {{ printf "127.0.0.1:%d/postgres?sslmode=disable" (int (include "postgresql.v1.service.port" .)) }}
{{- if .Values.auth.usePasswordFiles }}
- name: DATA_SOURCE_PASS_FILE
value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.userPasswordKey" .) }}
value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include (ternary "postgresql.v1.adminPasswordKey" "postgresql.v1.userPasswordKey" (empty $customUser)) .) }}
{{- else }}
- name: DATA_SOURCE_PASS
valueFrom:
secretKeyRef:
name: {{ include "postgresql.v1.secretName" . }}
key: {{ include "postgresql.v1.userPasswordKey" . }}
key: {{ include (ternary "postgresql.v1.adminPasswordKey" "postgresql.v1.userPasswordKey" (empty $customUser)) . }}
{{- end }}
- name: DATA_SOURCE_USER
value: {{ default "postgres" $customUser | quote }}