Skip to content

Commit 09dc6b5

Browse files
authored
Merge pull request #276 from replicatedhq/divolgin/panic
Don't panic when pod is in a waiting state
2 parents 446b1d5 + 3d301f4 commit 09dc6b5

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)