Skip to content

Commit bcd729b

Browse files
authored
Add selector to master service when switching to CM (#2955)
Add service selector comparison to compareServices This is necessary for the proper switch of `kubernetes_use_configmaps` configuration value, as master service should have different label selector setup for those.
1 parent d98fc27 commit bcd729b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cluster/cluster.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,10 @@ func (c *Cluster) compareServices(old, new *v1.Service) (bool, string) {
841841
return false, "new service's owner references do not match the current ones"
842842
}
843843

844+
if !reflect.DeepEqual(old.Spec.Selector, new.Spec.Selector) {
845+
return false, "new service's selector does not match the current one"
846+
}
847+
844848
return true, ""
845849
}
846850

0 commit comments

Comments
 (0)