Skip to content

Commit

Permalink
Merge pull request #276 from replicatedhq/divolgin/panic
Browse files Browse the repository at this point in the history
Don't panic when pod is in a waiting state
  • Loading branch information
divolgin committed Oct 6, 2020
2 parents 446b1d5 + 3d301f4 commit 09dc6b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/collect/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'")
}
}
Expand Down

0 comments on commit 09dc6b5

Please sign in to comment.