mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #28982 from yujuhong/rm_todos
Automatic merge from submit-queue kubelet: remove outdated TODOs
This commit is contained in:
commit
18df451031
@ -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
|
||||
}
|
||||
|
@ -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?
|
||||
|
@ -2421,7 +2421,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
|
||||
@ -2585,7 +2585,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.
|
||||
|
Loading…
Reference in New Issue
Block a user