mirror of https://github.com/k3s-io/k3s
Tweak netpol node wait logs
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 513c3416e7
)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/9707/head
parent
5ff3108ef1
commit
853473c180
|
@ -74,19 +74,20 @@ func Run(ctx context.Context, nodeConfig *config.Node) error {
|
|||
// Get the node object
|
||||
node, err := client.CoreV1().Nodes().Get(ctx, nodeConfig.AgentConfig.NodeName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
logrus.Errorf("Error getting the node object: %v", err)
|
||||
logrus.Debugf("Network policy controller waiting to get Node %s: %v", nodeConfig.AgentConfig.NodeName, 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
|
||||
for _, taint := range node.Spec.Taints {
|
||||
if taint.Key == cloudproviderapi.TaintExternalCloudProvider {
|
||||
logrus.Debugf("Network policy controller waiting for removal of %s taint", cloudproviderapi.TaintExternalCloudProvider)
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
return true, nil
|
||||
}); err != nil {
|
||||
return err
|
||||
return errors.Wrapf(err, "network policy controller timed out waiting for %s taint to be removed from Node %s", cloudproviderapi.TaintExternalCloudProvider, nodeConfig.AgentConfig.NodeName)
|
||||
}
|
||||
|
||||
krConfig := options.NewKubeRouterConfig()
|
||||
|
|
Loading…
Reference in New Issue