-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
postgresql-hasolvedstale15 days without activity15 days without activitytech-issuesThe user has a technical issue about an applicationThe user has a technical issue about an applicationtriageTriage is neededTriage is needed
Description
Name and Version
bitnami/postgresql-ha-15.3.8
What architecture are you using?
None
What steps will reproduce the bug?
Deploy HelmChart using different passwords (values) defined in secret "my-db-secret", and use this secret file in "postgresql.existingSecret: my-db-secret".
postgresql-ha-15.3.8.tgz/postgresql-ha/templates/pgpool/deployment.yaml
{{- if .Values.postgresql.usePasswordFiles }}
- name: PGPOOL_POSTGRES_PASSWORD_FILE
value: "/opt/bitnami/pgpool/secrets/pgpool-password"
{{- else }}
- name: PGPOOL_POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "postgresql-ha.postgresqlSecretName" . }}
key: password
{{- end }}
key should be "postgres-password", not "password".
Secret file content example below.
How to test:
kubectl exec --tty --stdin -n <my_namespace> pod/my-postgresql-ha-pgpool-b9c77db9d-q5wrt -- bash -c "env | sort"
=> check content of PGPOOL_POSTGRES_PASSWORD
=> using wrong password
=> pgpool keeps restarting (due to invalid probe)...
Are you using any custom parameters or values?
secret-postgresql.yaml
apiVersion: v1
kind: Secret
metadata:
name: my-db-secret
labels:
{{ toYaml .Values.global.labels | nindent 4 }}
type: Opaque
stringData:
postgres-password: pwd1
password: pwd2
repmgr-password: pwd3What is the expected behavior?
PGPOOL_POSTGRES_PASSWORD should use password from correct secretKeyRef.
What do you see instead?
Password from the other key.
smilingDima
Metadata
Metadata
Assignees
Labels
postgresql-hasolvedstale15 days without activity15 days without activitytech-issuesThe user has a technical issue about an applicationThe user has a technical issue about an applicationtriageTriage is neededTriage is needed