Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support passing POSTGRES_INITSCRIPTS_PASSWORD from k8s secret #30469

Open
james64 opened this issue Nov 15, 2024 · 0 comments
Open

Support passing POSTGRES_INITSCRIPTS_PASSWORD from k8s secret #30469

james64 opened this issue Nov 15, 2024 · 0 comments
Assignees
Labels

Comments

@james64
Copy link

james64 commented Nov 15, 2024

Name and Version

bitnami/postgres:latest

What is the problem this feature will solve?

This is the list of environment variables passed to primary statefulset which contains passwords:

  • POSTGRES_PASSWORD
  • POSTGRES_POSTGRES_PASSWORD
  • POSTGRES_REPLICATION_PASSWORD
  • POSTGRES_INITSCRIPTS_PASSWORD
  • POSTGRES_LDAP_BIND_PASSWORD

All of these have the value passed in via valueFrom.secretKeyRef as it should be. All of them except POSTGRES_INITSCRIPTS_PASSWORD which is passed by value directly in sts yaml definition.

What is the feature you are proposing to solve the problem?

Add support for passing password directly or as pre-existing secret. When passed directly add it to some secret and reference it in sts yaml using valueFrom.secretKeyRef. Standard stuff which already works for the rest of pg_pswd env vars.

What alternatives have you considered?

It is possible to pass the password as part of primary.extraEnvVarsSecret. But that still means that primary.initdb.password should be updated as suggested above or removed as not useful.

@github-actions github-actions bot added the triage Triage is needed label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants