percona / percona/percona-postgresql-operator

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

Open
#935 3 comments 1 reaction 1 assignee View on GitHub

@gkech is already working on this.

Since Sep 26, 2025.

bug jira-task
Dominant language
Go
Stars
385
Forks
83
Avg merge
2d 5h
Merged PRs (30d)
39

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.