Skip to content

Commit

Permalink
Handle ImagePullBackOff pod status (#3580)
Browse files Browse the repository at this point in the history
close: #3555

Put the same logic from `waitStep` and call the function
`isImagePullBackOffState` in the `tailStep` function.

---------

Co-authored-by: elias.souza <elias.souza@quintoandar.com.br>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 15, 2024
1 parent b8763a8 commit f211a78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pipeline/backend/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ func (e *kube) TailStep(ctx context.Context, step *types.Step, taskUUID string)
}

if pod.Name == podName {
if isImagePullBackOffState(pod) {
up <- true
}
switch pod.Status.Phase {
case v1.PodRunning, v1.PodSucceeded, v1.PodFailed:
up <- true
Expand Down

0 comments on commit f211a78

Please sign in to comment.