mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
Verify running mirror pod has running containers
This commit is contained in:
parent
4db3a096ce
commit
d2c78b6589
@ -192,6 +192,11 @@ func checkMirrorPodRunning(cl clientset.Interface, name, namespace string) error
|
||||
if pod.Status.Phase != v1.PodRunning {
|
||||
return fmt.Errorf("expected the mirror pod %q to be running, got %q", name, pod.Status.Phase)
|
||||
}
|
||||
for i := range pod.Status.ContainerStatuses {
|
||||
if pod.Status.ContainerStatuses[i].State.Running == nil {
|
||||
return fmt.Errorf("expected the mirror pod %q with container %q to be running", name, pod.Status.ContainerStatuses[i].Name)
|
||||
}
|
||||
}
|
||||
return validateMirrorPod(cl, pod)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user