zalando / postgres-operator

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

pooler deployment is not recreated #2446

Open antonmatsiuk opened 1 year ago

antonmatsiuk commented 1 year ago

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

Postgres Operator does not recreate pooler deployment if it existed in the kubernetes cluster before. Steps to reproduce:

  1. Create Postgres operator deployment
  2. Create a postgresqlCluster with the following parameters:
      numberOfInstances: 3
      enableConnectionPooler: true
      enableMasterLoadBalancer: false
      enableMasterPoolerLoadBalancer: false
      postgresql:
        version: "15"
  3. Remove (disable) Postgres operator deployment.
  4. recreate deployment and cluster from steps 1 and 2 At this point postgres-ha-pooler Deployment and Kubernetes service are missing. Postgres pods fail to start without pooler. Postgres operator related logs are:

time="2023-10-16T13:55:12Z" level=info msg=" \"Schema\": \"pooler\"," pkg=controller time="2023-10-16T13:55:12Z" level=info msg=" \"User\": \"pooler\"," pkg=controller ... time="2023-10-16T13:55:12Z" level=info msg=" \"ConnectionPoolerDefaultCPURequest\": \"500m\"," pkg=controller time="2023-10-16T13:55:12Z" level=info msg=" \"ConnectionPoolerDefaultMemoryRequest\": \"100Mi\"," pkg=controller time="2023-10-16T13:55:12Z" level=info msg=" \"ConnectionPoolerDefaultCPULimit\": \"1000m\"," pkg=controller time="2023-10-16T13:55:12Z" level=info msg=" \"ConnectionPoolerDefaultMemoryLimit\": \"512Mi\"," pkg=controller ... time="2023-10-16T13:55:12Z" level=info msg=" \"EnableMasterPoolerLoadBalancer\": false," pkg=controller time="2023-10-16T13:55:12Z" level=info msg=" \"EnableReplicaPoolerLoadBalancer\": false," pkg=controller ... time="2023-10-16T13:55:13Z" level=warning msg="could not connect to Postgres database: dial tcp 172.20.205.79:5432: connect: connection refused"


Expected behavior: Postgres operator recreates pooler deployment and service properly. 
antonmatsiuk commented 6 months ago

any update on this?