@@ -1683,7 +1683,7 @@ func (c *Cluster) generateStatefulSet(spec *cpov1.PostgresSpec) (*appsv1.Statefu
16831683 Spec : appsv1.StatefulSetSpec {
16841684 Replicas : & numberOfInstances ,
16851685 Selector : c .labelsSelector (TYPE_POSTGRESQL ),
1686- ServiceName : c .serviceName (Master ),
1686+ ServiceName : c .serviceName (ClusterPods ),
16871687 Template : * podTemplate ,
16881688 VolumeClaimTemplates : []v1.PersistentVolumeClaim {* volumeClaimTemplate },
16891689 UpdateStrategy : updateStrategy ,
@@ -3253,7 +3253,7 @@ func (c *Cluster) generatePgbackrestRepoHostConfigmap() (*v1.ConfigMap, error) {
32533253 }
32543254 n := c .Postgresql .Spec .NumberOfInstances
32553255 for j := int32 (0 ); j < n ; j ++ {
3256- config += "\n pg" + fmt .Sprintf ("%d" , j + 1 ) + "-host = " + c .clusterName ().Name + "-" + fmt .Sprintf ("%d" , j ) + "." + c .clusterName (). Name + "." + c .Namespace + ".svc." + c .OpConfig .ClusterDomain
3256+ config += "\n pg" + fmt .Sprintf ("%d" , j + 1 ) + "-host = " + c .clusterName ().Name + "-" + fmt .Sprintf ("%d" , j ) + "." + c .serviceName ( ClusterPods ) + "." + c .Namespace + ".svc." + c .OpConfig .ClusterDomain
32573257 config += "\n pg" + fmt .Sprintf ("%d" , j + 1 ) + "-host-ca-file = /etc/pgbackrest/certs/pgbackrest.ca-roots"
32583258 config += "\n pg" + fmt .Sprintf ("%d" , j + 1 ) + "-host-cert-file = /etc/pgbackrest/certs/pgbackrest-repo-host.crt"
32593259 config += "\n pg" + fmt .Sprintf ("%d" , j + 1 ) + "-host-key-file = /etc/pgbackrest/certs/pgbackrest-repo-host.key"
0 commit comments