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(
148
148
Port : * cluster .Spec .Port ,
149
149
Protocol : corev1 .ProtocolTCP ,
150
150
TargetPort : intstr .FromString (naming .PortPostgreSQL ),
151
- AppProtocol : initialize .String (naming . AppProtocolPOSTGRES ),
151
+ AppProtocol : initialize .String (postgres . IANAServiceName ),
152
152
}}
153
153
154
154
// Resolve to the ClusterIP for which Patroni has configured the Endpoints.
@@ -228,7 +228,7 @@ func (r *Reconciler) generateClusterReplicaService(
228
228
Port : * cluster .Spec .Port ,
229
229
Protocol : corev1 .ProtocolTCP ,
230
230
TargetPort : intstr .FromString (naming .PortPostgreSQL ),
231
- AppProtocol : initialize .String (naming . AppProtocolPOSTGRES ),
231
+ AppProtocol : initialize .String (postgres . IANAServiceName ),
232
232
}}
233
233
234
234
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(
266
266
Port : * cluster .Spec .Port ,
267
267
Protocol : corev1 .ProtocolTCP ,
268
268
TargetPort : intstr .FromString (naming .PortPostgreSQL ),
269
- AppProtocol : initialize .String (naming . AppProtocolPOSTGRES ),
269
+ AppProtocol : initialize .String (postgres . IANAServiceName ),
270
270
}
271
271
272
272
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(
295
295
Port : * cluster .Spec .Proxy .PGBouncer .Port ,
296
296
Protocol : corev1 .ProtocolTCP ,
297
297
TargetPort : intstr .FromString (naming .PortPGBouncer ),
298
- AppProtocol : initialize .String (naming . AppProtocolPOSTGRES ),
298
+ AppProtocol : initialize .String (postgres . IANAServiceName ),
299
299
}
300
300
301
301
if spec := cluster .Spec .Proxy .PGBouncer .Service ; spec == nil {
Original file line number Diff line number Diff line change @@ -187,12 +187,8 @@ const (
187
187
)
188
188
189
189
const (
190
- // AppProtocolTCP is the name of the appProtocol for the Service which use the tcp protocol
191
- AppProtocolTCP = "tcp"
192
190
// AppProtocolTCP is the name of the appProtocol for the Service which use the http protocol
193
191
AppProtocolHTTP = "http"
194
- // AppProtocolTCP is the name of the appProtocol for the Service which use the PostgreSQL protocol
195
- AppProtocolPOSTGRES = "postgresql"
196
192
)
197
193
198
194
// AsObjectKey converts the ObjectMeta API type to a client.ObjectKey.
You can’t perform that action at this time.
0 commit comments