zalando / postgres-operator

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

Operator does not use pod_service_account_definition for creating service account for the Cluster #2602

Open thanasis-liapis opened 7 months ago

thanasis-liapis commented 7 months ago

Please, answer some short questions which should help us to understand your problem / question better?

Some general remarks when posting a bug report:

Dear contributors of the operator,

I am trying to create an automated deployment using the postgres operator for PostgreSQL clusters. The K8S cluster I am running in has several security policies I have to overcome. One of them is the use of internal repositories to download my images. These internal repos require authentication/autorization, so I am required to use imagePullSecrets for the Postgresql cluster's pods. After several tries in the operator, I realized that it does not support using imagePullSecrets setting for the cluster (resource kind: postgres). So, alternatively, I thought of using the service account used for creating the cluster, and adding to this account's definition the imagePullSecrets setting. I tried to do this by the pod_service_account_definition setting of the operator. However, I again saw that for some reason, this setting is not used. Instead, regardless of what I put there, the service account created and used for the cluster is pgzalando-pod-sa which I cannot find where it is set.

Please, could someone elaborate and indicate where this name is set and how can I use the pod_service_account_definition so I can enable imagePullSecrets?

Any further information at your disposal.

Thank you in advance!

thanasis-liapis commented 7 months ago

Same for operator v1.11.0

teimyBr commented 3 months ago

https://github.com/zalando/postgres-operator/issues/2721#issuecomment-2277764377 see here this is working in our side with newest and also older versions