mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #68289 from denkensk/fix-simple-pkg-kubelet
Simple code fixed in in pkg/kubelet
This commit is contained in:
commit
a8e8e891f2
@ -151,7 +151,7 @@ func (kl *Kubelet) updateDefaultLabels(initialNode, existingNode *v1.Node) bool
|
||||
kubeletapis.LabelArch,
|
||||
}
|
||||
|
||||
var needsUpdate bool = false
|
||||
needsUpdate := false
|
||||
if existingNode.Labels == nil {
|
||||
existingNode.Labels = make(map[string]string)
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, h
|
||||
mountEtcHostsFile := len(podIP) > 0 && runtime.GOOS != "windows"
|
||||
glog.V(3).Infof("container: %v/%v/%v podIP: %q creating hosts mount: %v", pod.Namespace, pod.Name, container.Name, podIP, mountEtcHostsFile)
|
||||
mounts := []kubecontainer.Mount{}
|
||||
var cleanupAction func() = nil
|
||||
var cleanupAction func()
|
||||
for i, mount := range container.VolumeMounts {
|
||||
// do not mount /etc/hosts if container is already mounting on the path
|
||||
mountEtcHostsFile = mountEtcHostsFile && (mount.MountPath != etcHostsPath)
|
||||
|
@ -318,7 +318,7 @@ func newTestKubeletWithImageList(
|
||||
allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...)
|
||||
}
|
||||
|
||||
var prober volume.DynamicPluginProber = nil // TODO (#51147) inject mock
|
||||
var prober volume.DynamicPluginProber // TODO (#51147) inject mock
|
||||
kubelet.volumePluginMgr, err =
|
||||
NewInitializedVolumePluginMgr(kubelet, kubelet.secretManager, kubelet.configMapManager, token.NewManager(kubelet.kubeClient), allPlugins, prober)
|
||||
require.NoError(t, err, "Failed to initialize VolumePluginMgr")
|
||||
|
Loading…
Reference in New Issue
Block a user