File tree Expand file tree Collapse file tree 4 files changed +4
-8
lines changed
controller/postgrescluster Expand file tree Collapse file tree 4 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ func (r *Reconciler) generateClusterPrimaryService(
148148 Port : * cluster .Spec .Port ,
149149 Protocol : corev1 .ProtocolTCP ,
150150 TargetPort : intstr .FromString (naming .PortPostgreSQL ),
151- AppProtocol : initialize .String (naming . AppProtocolPOSTGRES ),
151+ AppProtocol : initialize .String (postgres . IANAServiceName ),
152152 }}
153153
154154 // Resolve to the ClusterIP for which Patroni has configured the Endpoints.
@@ -228,7 +228,7 @@ func (r *Reconciler) generateClusterReplicaService(
228228 Port : * cluster .Spec .Port ,
229229 Protocol : corev1 .ProtocolTCP ,
230230 TargetPort : intstr .FromString (naming .PortPostgreSQL ),
231- AppProtocol : initialize .String (naming . AppProtocolPOSTGRES ),
231+ AppProtocol : initialize .String (postgres . IANAServiceName ),
232232 }}
233233
234234 err := errors .WithStack (r .setControllerReference (cluster , service ))
Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ func (r *Reconciler) generatePatroniLeaderLeaseService(
266266 Port : * cluster .Spec .Port ,
267267 Protocol : corev1 .ProtocolTCP ,
268268 TargetPort : intstr .FromString (naming .PortPostgreSQL ),
269- AppProtocol : initialize .String (naming . AppProtocolPOSTGRES ),
269+ AppProtocol : initialize .String (postgres . IANAServiceName ),
270270 }
271271
272272 if spec := cluster .Spec .Service ; spec == nil {
Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ func (r *Reconciler) generatePGBouncerService(
295295 Port : * cluster .Spec .Proxy .PGBouncer .Port ,
296296 Protocol : corev1 .ProtocolTCP ,
297297 TargetPort : intstr .FromString (naming .PortPGBouncer ),
298- AppProtocol : initialize .String (naming . AppProtocolPOSTGRES ),
298+ AppProtocol : initialize .String (postgres . IANAServiceName ),
299299 }
300300
301301 if spec := cluster .Spec .Proxy .PGBouncer .Service ; spec == nil {
Original file line number Diff line number Diff line change @@ -187,12 +187,8 @@ const (
187187)
188188
189189const (
190- // AppProtocolTCP is the name of the appProtocol for the Service which use the tcp protocol
191- AppProtocolTCP = "tcp"
192190 // AppProtocolTCP is the name of the appProtocol for the Service which use the http protocol
193191 AppProtocolHTTP = "http"
194- // AppProtocolTCP is the name of the appProtocol for the Service which use the PostgreSQL protocol
195- AppProtocolPOSTGRES = "postgresql"
196192)
197193
198194// AsObjectKey converts the ObjectMeta API type to a client.ObjectKey.
You can’t perform that action at this time.
0 commit comments