mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Clean up rkt specific code in pkg/kubelet/pleg
Clean up code in PLEG which was only necessary for the `rkt` runtime. Rkt is no longer a built-in runtime and docker(shim) uses the CRI, so its safe to remove this code entirely. This diff removes the last mentions of `rkt` in the kubelet.
This commit is contained in:
parent
f5034a6e4a
commit
ab7e0f58d5
@ -365,17 +365,6 @@ func (g *GenericPLEG) getPodIPs(pid types.UID, status *kubecontainer.PodStatus)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(status.SandboxStatuses) == 0 {
|
|
||||||
// Without sandboxes (which built-in runtimes like rkt don't report)
|
|
||||||
// look at all the container statuses, and if any containers are
|
|
||||||
// running then use the new pod IP
|
|
||||||
for _, containerStatus := range status.ContainerStatuses {
|
|
||||||
if containerStatus.State == kubecontainer.ContainerStateCreated || containerStatus.State == kubecontainer.ContainerStateRunning {
|
|
||||||
return status.IPs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For pods with no ready containers or sandboxes (like exited pods)
|
// For pods with no ready containers or sandboxes (like exited pods)
|
||||||
// use the old status' pod IP
|
// use the old status' pod IP
|
||||||
return oldStatus.IPs
|
return oldStatus.IPs
|
||||||
|
Loading…
Reference in New Issue
Block a user