zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.36k stars 980 forks source link

Connection pooler pgbouncer pod is missing imagePullSecrets #1969

Open ErikLundJensen opened 2 years ago

ErikLundJensen commented 2 years ago

Feature:

When adding connection pooler in the Postgresql CR then the pgbouncer deployment/pods do not get the imagePullSecrets specified in the Helm chart. The pgbouncer pod is using service account "default" and not the account specified in "pod_service_account_name".

Thereby it is not possible to run the connection pooler using a private container registry.

I suggest that the specified service account "pod_service_account_name" is used for the pgbouncer deployment like it is done for the postgresql statefulset. Thereby the imagePullSecrets defined in "pod_service_account_definition" will be used for the pgbouncer as well.

Alternative is to expand the connection pooler configuration with imagePullSecrets options, however, that would just make the usage more complex.

I recommend to reuse the existing service account created for the database pods.

General information: We are running operator registry.opensource.zalan.do/acid/postgres-operator:v1.8.0 at Kubernetes on-premises

FxKu commented 2 years ago

Sounds like a good PR for me. You want to give it a shot @ErikLundJensen ?

Jokertwo commented 1 year ago

We have the same problem, any progress?