Merge pull request #68289 from denkensk/fix-simple-pkg-kubelet

Simple code fixed in in pkg/kubelet
This commit is contained in:
k8s-ci-robot 2018-09-25 06:14:03 -07:00 committed by GitHub
commit a8e8e891f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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)
}

View File

@ -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)

View File

@ -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")