Skip to content

Commit 3d301f4

Browse files
committed
Don't panic when pod is in a waiting state
1 parent 446b1d5 commit 3d301f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/collect/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func runWithoutTimeout(ctx context.Context, c *Collector, pod *corev1.Pod, runCo
9090
}
9191
if status.Status.Phase == corev1.PodPending {
9292
for _, v := range status.Status.ContainerStatuses {
93-
if v.State.Waiting.Reason == "ImagePullBackOff" {
93+
if v.State.Waiting != nil && v.State.Waiting.Reason == "ImagePullBackOff" {
9494
return nil, errors.Errorf("run pod aborted after getting pod status 'ImagePullBackOff'")
9595
}
9696
}

0 commit comments

Comments
 (0)