Skip to content

Commit

Permalink
fix(bitnami/postgresql): use adminPassword for metrics user when cust…
Browse files Browse the repository at this point in the history
…om user is not set on primary

Signed-off-by: Gaël Reyrol <[email protected]>
  • Loading branch information
gaelreyrol committed Feb 8, 2025
1 parent 49dd6d4 commit ac5c940
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bitnami/postgresql/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ maintainers:
name: postgresql
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
version: 16.4.6
version: 16.4.7
6 changes: 3 additions & 3 deletions bitnami/postgresql/templates/primary/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -539,16 +539,16 @@ 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.adminPasswordKey" .) }}
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.adminPasswordKey" . }}
key: {{ include (ternary "postgresql.v1.adminPasswordKey" "postgresql.v1.userPasswordKey" (empty $customUser)) . }}
{{- end }}
- name: DATA_SOURCE_USER
value: "postgres"
value: {{ default "postgres" $customUser | quote }}
{{- if .Values.metrics.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
Expand Down

0 comments on commit ac5c940

Please sign in to comment.