From e33731b2b56e5abc0e808b30b6e47b1a583aca94 Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Thu, 4 Jan 2024 18:53:10 +0100 Subject: [PATCH] feat: node update should trigger metadata update Signed-off-by: Mateusz Urbanek --- cloud/linode/node_controller.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cloud/linode/node_controller.go b/cloud/linode/node_controller.go index fba6c6f0..69344a27 100644 --- a/cloud/linode/node_controller.go +++ b/cloud/linode/node_controller.go @@ -43,7 +43,16 @@ func (s *nodeController) Run(stopCh <-chan struct{}) { return } - klog.Infof("NodeController will handle node (%s) metadata", node.Name) + klog.Infof("NodeController will handle newly created node (%s) metadata", node.Name) + s.queue.Add(node) + }, + UpdateFunc: func(_, new interface{}) { + node, ok := new.(*v1.Node) + if !ok { + return + } + + klog.Infof("NodeController will handle updated node (%s) metadata", node.Name) s.queue.Add(node) }, })