Skip to content

Commit

Permalink
Merge pull request #619 from knw257/devel
Browse files Browse the repository at this point in the history
Check whether State.Waiting object exists
  • Loading branch information
fosterseth authored Jun 8, 2022
2 parents c44b81a + 38de46d commit ce6c620
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/workceptor/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,13 @@ func podRunningAndReady() func(event watch.Event) (bool, error) {
conditions[i].Status == corev1.ConditionFalse {
statuses := t.Status.ContainerStatuses
for j := range statuses {
if statuses[j].State.Waiting.Reason == "ImagePullBackOff" {
if imagePullBackOffRetries == 0 {
return false, ErrImagePullBackOff
if statuses[j].State.Waiting != nil {
if statuses[j].State.Waiting.Reason == "ImagePullBackOff" {
if imagePullBackOffRetries == 0 {
return false, ErrImagePullBackOff
}
imagePullBackOffRetries--
}
imagePullBackOffRetries--
}
}
}
Expand Down

0 comments on commit ce6c620

Please sign in to comment.