PostgreSQL In Kubernetes cannot use DEFAULT_USER from secret but can from value - Stack Overflow
config map vs secret to store credentials for Postgres deployment
postgresql - Problem with postgres in kubernetes when using password in configMap or secret - Stack Overflow
Secret Management in Kubernetes with HashiCorp Vault and Dynamic PostgreSQL Credentials - Vault - HashiCorp Discuss
Videos
Currently I have Postgres deployed in my k8s cluster with its TLS certs provided manually via a mounted volume. In the interest of further automating my environment configuration, I want to instead provide the TLS cert/key via a k8s secret. This is the first step down a long list of changes, but I digress.
Anyway, I have everything configured perfectly. The cert/key are mounted via a volume that pulls from a TLS secret. The problem is Postgres requires the cert/key to be owned by the postgres user, and the files from the secret are owned by the root user. I've been googling this problem for a minute, and what I've found so far are references to some kind of BusyBox solution with a sidecar container that I can't for the life of me figure out (haven't done multi-container pods before). I can already see that k8s doesn't support changing the ownership of the mounted secret, there's an open issue on their GitHub about this.
Anyway, I'm sure there's some solution out there for this. Really hoping someone can guide me here. Thanks.