From 17dc6bc305ce658e634432c70b4932bbfef2f9e6 Mon Sep 17 00:00:00 2001 From: Polina Bungina Date: Thu, 18 Sep 2025 16:05:48 +0200 Subject: [PATCH] Add selector to master service when switching to CM --- pkg/cluster/cluster.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index e9a691faa..f1d9ce164 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -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, "" }