Commit e44b5851 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #54315 from dims/fix-panic-on-kubeproxy-cleanup

Automatic merge from submit-queue (batch tested with PRs 53946, 53993, 54315, 54143, 54532). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix kube-proxy panic on cleanup **What this PR does / why we need it**: Set the execer properly when we initialize ProxyServer or we will end up with a panic. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # Fixes #54305 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents 7cadcd05 b370cc1b
...@@ -83,7 +83,12 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx ...@@ -83,7 +83,12 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
// We omit creation of pretty much everything if we run in cleanup mode // We omit creation of pretty much everything if we run in cleanup mode
if cleanupAndExit { 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) client, eventClient, err := createClients(config.ClientConnection, master)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment