From 86f102134ed6b1669badd3bfb6420f73e8f015d0 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Mon, 26 Feb 2024 18:44:50 +0000 Subject: [PATCH] Fix netpol startup when flannel is disabled Don't break out of the poll loop if we can't get the node, RBAC might not be ready yet. Signed-off-by: Brad Davidson --- pkg/agent/netpol/netpol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/agent/netpol/netpol.go b/pkg/agent/netpol/netpol.go index f241e27b8164..88ef81c316af 100644 --- a/pkg/agent/netpol/netpol.go +++ b/pkg/agent/netpol/netpol.go @@ -75,7 +75,7 @@ func Run(ctx context.Context, nodeConfig *config.Node) error { node, err := client.CoreV1().Nodes().Get(ctx, nodeConfig.AgentConfig.NodeName, metav1.GetOptions{}) if err != nil { logrus.Errorf("Error getting the node object: %v", err) - return false, err + return false, nil } // Check for the uninitialized taint that should be removed by cloud-provider // If there is no cloud-provider, the taint will not be there