mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #96141 from lingsamuel/rm-useless-if
Remove useless variable and if in kubelet.go
This commit is contained in:
commit
c97d9e96ae
@ -270,13 +270,9 @@ func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, ku
|
|||||||
config.NewSourceURL(kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(kubetypes.HTTPSource))
|
config.NewSourceURL(kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(kubetypes.HTTPSource))
|
||||||
}
|
}
|
||||||
|
|
||||||
var updatechannel chan<- interface{}
|
|
||||||
if kubeDeps.KubeClient != nil {
|
if kubeDeps.KubeClient != nil {
|
||||||
klog.Infof("Watching apiserver")
|
klog.Infof("Watching apiserver")
|
||||||
if updatechannel == nil {
|
config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, cfg.Channel(kubetypes.ApiserverSource))
|
||||||
updatechannel = cfg.Channel(kubetypes.ApiserverSource)
|
|
||||||
}
|
|
||||||
config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, updatechannel)
|
|
||||||
}
|
}
|
||||||
return cfg, nil
|
return cfg, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user