Fix netpol crash when node remains tained unintialized
It is concievable that users might take more than 60 seconds to deploy their own cloud-provider. Instead of exiting, we should wait forever, but with more logging to indicate what's being waited on.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
logrus.Debugf("Network policy controller waiting for removal of %s taint",cloudproviderapi.TaintExternalCloudProvider)
logrus.Infof("Network policy controller waiting for removal of %s taint",cloudproviderapi.TaintExternalCloudProvider)
returnfalse,nil
}
}
returntrue,nil
});err!=nil{
returnerrors.Wrapf(err,"network policy controller timed out waiting for %s taint to be removed from Node %s",cloudproviderapi.TaintExternalCloudProvider,nodeConfig.AgentConfig.NodeName)
returnerrors.Wrapf(err,"network policy controller failed to wait for %s taint to be removed from Node %s",cloudproviderapi.TaintExternalCloudProvider,nodeConfig.AgentConfig.NodeName)