diff --git a/pkg/collect/run.go b/pkg/collect/run.go index 3c3bffb4..578faab9 100644 --- a/pkg/collect/run.go +++ b/pkg/collect/run.go @@ -89,6 +89,13 @@ func runWithoutTimeout(ctx context.Context, c *Collector, pod *corev1.Pod, runCo status.Status.Phase == corev1.PodSucceeded { break } + if status.Status.Phase == corev1.PodPending { + for _, v := range status.Status.ContainerStatuses { + if v.State.Waiting.Reason == "ImagePullBackOff" { + return nil, errors.Errorf("run pod aborted after getting pod status 'ImagePullBackOff'") + } + } + } time.Sleep(time.Second * 1) }