Merge pull request #87193 from mattjmcnaughton/mattjmcnaughton/cleanup-rkt-code-in-pleg

Clean up rkt specific code in `pkg/kubelet/pleg`
This commit is contained in:
Kubernetes Prow Robot 2020-01-14 22:21:46 -08:00 committed by GitHub
commit de34d2ce1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
// use the old status' pod IP
return oldStatus.IPs