Skip to content

Commit 39a1d6c

Browse files
author
Jonathan S. Katz
committed
Have pgBouncer come up with specified # of replicas on startup
This was defaulting to 1 instead of taking the value that was in the pgcluster CRD. Issue: [ch8675]
1 parent 459931d commit 39a1d6c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/operator/cluster/clusterlogic.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,11 @@ func ScaleClusterDeployments(clientset kubernetes.Interface, cluster crv1.Pgclus
740740
if !scalePGBouncer {
741741
continue
742742
}
743+
// if the replica total is greater than 0, set number of pgBouncer
744+
// replicas to the number that is specified in the cluster entry
745+
if replicas > 0 {
746+
replicas = int(cluster.Spec.PgBouncer.Replicas)
747+
}
743748
case deployment.Labels[config.LABEL_PGO_BACKREST_REPO] == "true":
744749
clusterInfo.PGBackRestRepoDeployment = deployment.Name
745750
// if not scaling services simply move on to the next deployment

0 commit comments

Comments
 (0)