CrunchyData / postgres-operator

Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service.
https://access.crunchydata.com/documentation/postgres-operator/v5/
Apache License 2.0
3.88k stars 585 forks source link

Enviroment variable in pods deployed via PostgresqlOperator v5.0.4 #3054

Open maleka12 opened 2 years ago

maleka12 commented 2 years ago

Overview

We want to add ENV to each pod deployed by postgrescluster crd. Is there any option to do that for every new deployed PostgresCluster by default? By now the only way I found to achieve that is to set env to statefulset manually, after cluster is deployed.

Use Case

We want to set proper TimeZone by adding env TZ into containers.

Desired Behavior

Enviroment variable will be automatically added to any new instance of postgrescluster.

Environment

aleksey-dv commented 2 years ago

+1 Could be very useful, for ex. additional env AWS_STS_REGIONAL_ENDPOINTS=regional to pgbackrest containers to assume role with access to S3 within local VPC STS endpoint

benjaminjb commented 1 year ago

Just writing to let you know that we have this issue in our backlog as it is a fairly common feature request.