Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: percona/percona-server-mongodb-operator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ed493dc535be9a312abd0e33bd40ec0617a47d1e
Choose a base ref
..
head repository: percona/percona-server-mongodb-operator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 91f58907a5ddc97a8bec12018d2e5abf98cec9a3
Choose a head ref
Showing with 7 additions and 2 deletions.
  1. +7 −2 pkg/psmdb/service.go
9 changes: 7 additions & 2 deletions pkg/psmdb/service.go
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ func Service(cr *api.PerconaServerMongoDB, replset *api.ReplsetSpec) *corev1.Ser
}
}
}
if cr.CompareVersion("1.16.0") < 0 {
if cr.CompareVersion("1.16.0") > 0 {
appProtocol := "mongo"
for _, v := range svc.Spec.Ports {
v.AppProtocol = &appProtocol
@@ -123,7 +123,12 @@ func ExternalService(cr *api.PerconaServerMongoDB, replset *api.ReplsetSpec, pod
default:
svc.Spec.Type = corev1.ServiceTypeClusterIP
}

if cr.CompareVersion("1.16.0") > 0 {
appProtocol := "mongo"
for _, v := range svc.Spec.Ports {
v.AppProtocol = &appProtocol
}
}
return svc
}