Ensure pgBouncer port is derived from Cluster spec
Previously, it was derived from the Postgres Operator configuration,
which is actually incorrect for several reasons, so technically
this constitutes a bug.
Issue:
@@ -555,7 +555,7 @@ func createPgBouncerDeployment(clientset kubernetes.Interface, cluster *crv1.Pgc
ClusterName: cluster.Name,
CCPImagePrefix: util.GetValueOrDefault(cluster.Spec.CCPImagePrefix, operator.Pgo.Cluster.CCPImagePrefix),
CCPImageTag: cluster.Spec.CCPImageTag,
- Port: operator.Pgo.Cluster.Port,
+ Port: cluster.Spec.Port,
PGBouncerConfigMap: util.GeneratePgBouncerConfigMapName(cluster.Name),
PGBouncerSecret: util.GeneratePgBouncerSecretName(cluster.Name),
ContainerResources: operator.GetResourcesJSON(cluster.Spec.PgBouncer.Resources,
