Remove useless variable and if

Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
This commit is contained in:
Ling Samuel 2020-11-03 15:57:22 +08:00
parent a69a4a4bf0
commit c7f2b2aa2f
No known key found for this signature in database
GPG Key ID: 1405A670863B367F

View File

@ -270,13 +270,9 @@ func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, ku
config.NewSourceURL(kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(kubetypes.HTTPSource))
}
var updatechannel chan<- interface{}
if kubeDeps.KubeClient != nil {
klog.Infof("Watching apiserver")
if updatechannel == nil {
updatechannel = cfg.Channel(kubetypes.ApiserverSource)
}
config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, updatechannel)
config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, cfg.Channel(kubetypes.ApiserverSource))
}
return cfg, nil
}