From 31e13bd10a040d1e8cd55f3dba614b20974fbe71 Mon Sep 17 00:00:00 2001 From: Kirill Sibirev Date: Fri, 13 Dec 2024 12:20:47 +0100 Subject: [PATCH] Fix updateSelector comp type --- controllers/sync.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/controllers/sync.go b/controllers/sync.go index 346dc752..f7da1121 100644 --- a/controllers/sync.go +++ b/controllers/sync.go @@ -440,13 +440,14 @@ func chooseUpdateFlow(spec ytv1.YtsaurusSpec, needUpdate []components.Component) needFullUpdate := false for _, comp := range needUpdate { - component := comp.GetType() - if canUpdateComponent(configuredSelector, component) { - canUpdate = append(canUpdate, string(component)) + componentType := comp.GetType() + componentName := comp.GetName() + if canUpdateComponent(configuredSelector, componentType) { + canUpdate = append(canUpdate, componentName) } else { - cannotUpdate = append(cannotUpdate, string(component)) + cannotUpdate = append(cannotUpdate, componentName) } - if !canUpdateComponent(ytv1.UpdateSelectorStatelessOnly, component) && component != consts.DataNodeType { + if !canUpdateComponent(ytv1.UpdateSelectorStatelessOnly, componentType) && componentType != consts.DataNodeType { needFullUpdate = true } }