Skip to content

Commit

Permalink
Setting appProtocol for service objects
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenmat committed Apr 23, 2024
1 parent a821182 commit 4eb5ee2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/psmdb/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 4eb5ee2

Please sign in to comment.