mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 11:51:21 +02:00
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.
This commit is contained in:
@@ -841,6 +841,10 @@ func (c *Cluster) compareServices(old, new *v1.Service) (bool, string) {
|
||||
return false, "new service's owner references do not match the current ones"
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(old.Spec.Selector, new.Spec.Selector) {
|
||||
return false, "new service's selector does not match the current one"
|
||||
}
|
||||
|
||||
return true, ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user