percona-postgresql-operator icon indicating copy to clipboard operation
percona-postgresql-operator copied to clipboard

When creating new `PerconaPGCluster` pgbouncer is always deployed, even if not specified

Open Kajot-dev opened this issue 1 year ago • 2 comments

Report

When deploying new PerconaPGCluster without the proxy section altogether, underlying PostgresCluster has pgbouncer defined with exactly one replica - but it should be not deployed at all.

Behavior is correct when using PostgresCluster directly or when migrating from an existing PostgresCluster to PerconaPGCluster (pgbouncer is not deployed)

More about the problem

Pgbouncer is deployed with one replica, even though pgbouncer configuration was not specified at all

Steps to reproduce

  1. Create new PerconaPGCLuster For example:
metadata:
  name: test-pg
  namespace: test-ns
spec:
  backups:
    pgbackrest:
      repos:
        - name: repo1
          volume:
            volumeClaimSpec:
              accessModes:
                - ReadWriteOnce
              resources:
                requests:
                  storage: 2Gi
  instances:
    - dataVolumeClaimSpec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 2Gi
      name: test
      replicas: 2
  port: 5432
  postgresVersion: 16
  1. Observe pgbouncer being deployed
  2. Create exact same (but with a different name) cluster using PostgresCluster CR directly and you'll see no pbbouncer deployed

Versions

  1. Kubernetes 1.28
  2. Operator 2.5.0
  3. Database 16.4

Anything else?

No response

Kajot-dev avatar Oct 21 '24 11:10 Kajot-dev

hi @Kajot-dev, it is impossible for now to deploy the cluster without pgbouncer

hors avatar Jan 13 '25 14:01 hors

@hors Thanks, yes I'm aware, that's exactly what my issue is about. It's possible to deploy it without pgbouncer by using PostgresCluster (upstream one from PGO) CRD directly, but not when using Percona flavored resource.

Kajot-dev avatar Jan 21 '25 14:01 Kajot-dev

thanks for raising this, we prepared a ticket for supporting this: https://perconadev.atlassian.net/browse/K8SPG-863

gkech avatar Sep 26 '25 09:09 gkech