mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
Merge pull request #276 from replicatedhq/divolgin/panic
Don't panic when pod is in a waiting state
This commit is contained in:
@@ -90,7 +90,7 @@ func runWithoutTimeout(ctx context.Context, c *Collector, pod *corev1.Pod, runCo
|
||||
}
|
||||
if status.Status.Phase == corev1.PodPending {
|
||||
for _, v := range status.Status.ContainerStatuses {
|
||||
if v.State.Waiting.Reason == "ImagePullBackOff" {
|
||||
if v.State.Waiting != nil && v.State.Waiting.Reason == "ImagePullBackOff" {
|
||||
return nil, errors.Errorf("run pod aborted after getting pod status 'ImagePullBackOff'")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user