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

Merge pull request #49137 from deads2k/proxier-01-really-nil

Automatic merge from submit-queue (batch tested with PRs 49058, 49072, 49137, 49182, 49045) check for nil value in interface for proxier health golang allows for a non-nil interface to have a nil value (not type). This results in an NPE at runtime. @sttts remember that bit about go? Trivia becomes real :(
parents 92d310ed 6d21f37a
......@@ -463,8 +463,10 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
recorder := eventBroadcaster.NewRecorder(scheme, clientv1.EventSource{Component: "kube-proxy", Host: hostname})
var healthzServer *healthcheck.HealthzServer
var healthzUpdater healthcheck.HealthzUpdater
if len(config.HealthzBindAddress) > 0 {
healthzServer = healthcheck.NewDefaultHealthzServer(config.HealthzBindAddress, 2*config.IPTables.SyncPeriod.Duration)
healthzUpdater = healthzServer
}
var proxier proxy.ProxyProvider
......@@ -498,7 +500,7 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
hostname,
nodeIP,
recorder,
healthzServer,
healthzUpdater,
)
if err != nil {
return nil, fmt.Errorf("unable to create proxier: %v", err)
......
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