We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63868d6 commit 0aa7517Copy full SHA for 0aa7517
internal/controller/postgrescluster/cluster.go
@@ -82,6 +82,19 @@ func (r *Reconciler) reconcileClusterPodService(
82
naming.LabelCluster: cluster.Name,
83
}
84
85
+ patroniPort := int32(8008)
86
+ if cluster.Spec.Patroni != nil && cluster.Spec.Patroni.Port != nil {
87
+ patroniPort = int32(*cluster.Spec.Patroni.Port)
88
+ }
89
+
90
+ clusterPodService.Spec.Ports = []corev1.ServicePort{
91
+ {
92
+ Name: "patroni-api",
93
+ Port: patroniPort,
94
+ Protocol: corev1.ProtocolTCP,
95
+ },
96
97
98
if err == nil {
99
err = errors.WithStack(r.apply(ctx, clusterPodService))
100
0 commit comments