Fix for kube-proxy to wait for some duration for the node to be defined

Kube-proxy must atleast wait for some duration for the node to defined so that it can fetch the node IP. This node IP is currently used in ipvs proxier for the node-port services.
This commit is contained in:
Subrata Paul
2019-04-28 00:25:18 +05:30
parent 54240ce5ba
commit dd9402f451
2 changed files with 26 additions and 8 deletions

View File

@@ -143,6 +143,9 @@ func newProxyServer(
nodeIP := net.ParseIP(config.BindAddress)
if nodeIP.IsUnspecified() {
nodeIP = utilnode.GetNodeIP(client, hostname)
if nodeIP == nil {
return nil, fmt.Errorf("unable to get node IP for hostname %s", hostname)
}
}
if proxyMode == proxyModeIPTables {
klog.V(0).Info("Using iptables Proxier.")