From 4eb5ee22b3c9b3f92963de2d52f2d6bbd37aff08 Mon Sep 17 00:00:00 2001 From: Soren Mathiasen Date: Thu, 14 Dec 2023 15:54:19 +0100 Subject: [PATCH] Setting appProtocol for service objects --- pkg/psmdb/service.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/psmdb/service.go b/pkg/psmdb/service.go index bf3ece15b6..abecab398b 100644 --- a/pkg/psmdb/service.go +++ b/pkg/psmdb/service.go @@ -28,7 +28,7 @@ func Service(cr *api.PerconaServerMongoDB, replset *api.ReplsetSpec) *corev1.Ser "app.kubernetes.io/managed-by": "percona-server-mongodb-operator", "app.kubernetes.io/part-of": "percona-server-mongodb", } - + appProtocol := "mongo" svc := &corev1.Service{ TypeMeta: metav1.TypeMeta{ APIVersion: "v1", @@ -42,9 +42,10 @@ func Service(cr *api.PerconaServerMongoDB, replset *api.ReplsetSpec) *corev1.Ser Spec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ { - Name: mongodPortName, - Port: api.DefaultMongodPort, - TargetPort: intstr.FromInt(int(api.DefaultMongodPort)), + Name: mongodPortName, + Port: api.DefaultMongodPort, + TargetPort: intstr.FromInt(int(api.DefaultMongodPort)), + AppProtocol: &appProtocol, }, }, ClusterIP: "None",