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 <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2024-02-26 18:44:50 +00:00 committed by Brad Davidson
parent fae0d99863
commit 86f102134e
1 changed files with 1 additions and 1 deletions

View File

@ -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