Take the database password from PGPASSWORD, not the DSN #9
Reference in New Issue
Block a user
Delete Branch "postgres-dsn-password"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #2. Found while starting the wrapper chart, which is the first thing that actually has to wire this up.
The chart as merged asks for a whole DSN in a Secret. Nothing writes one. The Zalando postgres operator generates a Secret with
usernameandpasswordkeys and no connection string, so using it would mean hand-maintaining a second copy of a password the operator owns and re-mints on a from-scratch rebuild — which is charts#176, the exact problem miniflux closed by doing the opposite.So:
database.dsnis a plain value with no password in it.database.passwordSecretsuppliesPGPASSWORD, pointed straight at the operator's Secret.pgx fills in from libpq's
PG*environment variables whatever the DSN omits, the same way miniflux's lib/pq does.Verified, not assumed — the same check charts#176 records for miniflux, against a real server:
PGPASSWORD→ connects and serves;PGPASSWORD→failed SASL auth: FATAL: password authentication failed for user "terdut" (SQLSTATE 28P01).So the variable is doing the work rather than being silently ignored.
It also keeps the credential out of the rendered manifest and out of
kubectl describe pod, which a DSN-with-password does not.Needed before the wrapper chart in
Ryuvia/chartscan declare thepostgresqlCR, and therefore before the cutover.