Fix kube-proxy panic on cleanup

Set the execer properly when we initialize ProxyServer or we will
end up with a panic.
This commit is contained in:
Davanum Srinivas 2017-10-20 14:20:19 -04:00
parent 0736c55776
commit b370cc1bc6

View File

@ -82,7 +82,12 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
// We omit creation of pretty much everything if we run in cleanup mode
if cleanupAndExit {
return &ProxyServer{IptInterface: iptInterface, IpvsInterface: ipvsInterface, CleanupAndExit: cleanupAndExit}, nil
return &ProxyServer{
execer: execer,
IptInterface: iptInterface,
IpvsInterface: ipvsInterface,
CleanupAndExit: cleanupAndExit,
}, nil
}
client, eventClient, err := createClients(config.ClientConnection, master)