From 007257a5adac832d276af10cbe0c617e6189f04a Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Thu, 14 Jul 2016 18:28:25 -0700 Subject: [PATCH] kubelet: remove outdated TODOs --- pkg/kubelet/dockertools/docker.go | 5 +---- pkg/kubelet/dockertools/docker_manager.go | 3 --- pkg/kubelet/kubelet.go | 3 +-- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/pkg/kubelet/dockertools/docker.go b/pkg/kubelet/dockertools/docker.go index 5ec2f6be4a4..5dcfd8a55e3 100644 --- a/pkg/kubelet/dockertools/docker.go +++ b/pkg/kubelet/dockertools/docker.go @@ -374,7 +374,6 @@ func milliCPUToShares(milliCPU int64) int64 { // GetKubeletDockerContainers lists all container or just the running ones. // Returns a list of docker containers that we manage -// TODO: Move this function with dockerCache to DockerManager. func GetKubeletDockerContainers(client DockerInterface, allContainers bool) ([]*dockertypes.Container, error) { result := []*dockertypes.Container{} containers, err := client.ListContainers(dockertypes.ContainerListOptions{All: allContainers}) @@ -388,9 +387,7 @@ func GetKubeletDockerContainers(client DockerInterface, allContainers bool) ([]* } // Skip containers that we didn't create to allow users to manually // spin up their own containers if they want. - // TODO(dchen1107): Remove the old separator "--" by end of Oct - if !strings.HasPrefix(container.Names[0], "/"+containerNamePrefix+"_") && - !strings.HasPrefix(container.Names[0], "/"+containerNamePrefix+"--") { + if !strings.HasPrefix(container.Names[0], "/"+containerNamePrefix+"_") { glog.V(3).Infof("Docker Container: %s is not managed by kubelet.", container.Names[0]) continue } diff --git a/pkg/kubelet/dockertools/docker_manager.go b/pkg/kubelet/dockertools/docker_manager.go index 4e6d181df92..43dd87cb077 100644 --- a/pkg/kubelet/dockertools/docker_manager.go +++ b/pkg/kubelet/dockertools/docker_manager.go @@ -849,7 +849,6 @@ func (dm *DockerManager) ListImages() ([]kubecontainer.Image, error) { return images, nil } -// TODO(vmarmol): Consider unexporting. // PullImage pulls an image from network to local storage. func (dm *DockerManager) PullImage(image kubecontainer.ImageSpec, secrets []api.Secret) error { return dm.dockerPuller.Pull(image.Image, secrets) @@ -1221,7 +1220,6 @@ func (dm *DockerManager) KillPod(pod *api.Pod, runningPod kubecontainer.Pod, gra return result.Error() } -// TODO(random-liu): This is just a temporary function, will be removed when we actually add PodSyncResult // NOTE(random-liu): The pod passed in could be *nil* when kubelet restarted. func (dm *DockerManager) killPodWithSyncResult(pod *api.Pod, runningPod kubecontainer.Pod, gracePeriodOverride *int64) (result kubecontainer.PodSyncResult) { // Send the kills in parallel since they may take a long time. @@ -2152,7 +2150,6 @@ func (dm *DockerManager) tryContainerStart(container *api.Container, pod *api.Po restartCount = containerStatus.RestartCount + 1 } - // TODO(dawnchen): Check RestartPolicy.DelaySeconds before restart a container _, err = dm.runContainerInPod(pod, container, namespaceMode, namespaceMode, pidMode, podIP, restartCount) if err != nil { // TODO(bburns) : Perhaps blacklist a container after N failures? diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index b8ed3cc1890..552bd9794ae 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -2414,7 +2414,7 @@ func (kl *Kubelet) dispatchWork(pod *api.Pod, syncType kubetypes.SyncPodType, mi } } -// TODO: Consider handling all mirror pods updates in a separate component. +// TODO: handle mirror pods in a separate component (issue #17251) func (kl *Kubelet) handleMirrorPod(mirrorPod *api.Pod, start time.Time) { // Mirror pod ADD/UPDATE/DELETE operations are considered an UPDATE to the // corresponding static pod. Send update to the pod worker if the static @@ -2578,7 +2578,6 @@ func (kl *Kubelet) validateContainerLogStatus(podName string, podStatus *api.Pod // TODO: this method is returning logs of random container attempts, when it should be returning the most recent attempt // or all of them. func (kl *Kubelet) GetKubeletContainerLogs(podFullName, containerName string, logOptions *api.PodLogOptions, stdout, stderr io.Writer) error { - // TODO(vmarmol): Refactor to not need the pod status and verification. // Pod workers periodically write status to statusManager. If status is not // cached there, something is wrong (or kubelet just restarted and hasn't // caught up yet). Just assume the pod is not ready yet.