mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 06:43:54 +00:00
parent
10255f8aec
commit
07d13c1fb4
@ -2845,6 +2845,10 @@ func (kl *Kubelet) validateContainerLogStatus(podName string, podStatus *api.Pod
|
||||
var cID string
|
||||
|
||||
cStatus, found := api.GetContainerStatus(podStatus.ContainerStatuses, containerName)
|
||||
// if not found, check the init containers
|
||||
if !found {
|
||||
cStatus, found = api.GetContainerStatus(podStatus.InitContainerStatuses, containerName)
|
||||
}
|
||||
if !found {
|
||||
return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is not available", containerName, podName)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user