percona / percona/percona-postgresql-operator
When creating new `PerconaPGCluster` pgbouncer is always deployed, even if not specified
Open
@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
- 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
- Observe pgbouncer being deployed
- Create exact same (but with a different name) cluster using
PostgresClusterCR directly and you'll see no pbbouncer deployed
Versions
- Kubernetes 1.28
- Operator 2.5.0
- Database 16.4
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.