Skip to content

Commit

Permalink
Merge pull request #20414 from smarterclayton/panic_in_build
Browse files Browse the repository at this point in the history
Prevent panic in build controller when pod has already been deleted
  • Loading branch information
smarterclayton authored Jul 28, 2018
2 parents 158ad31 + 5d12941 commit ef9d5a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/build/controller/build/build_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,9 @@ func (bc *BuildController) handleActiveBuild(build *buildapi.Build, pod *v1.Pod)
}

func isOOMKilled(pod *v1.Pod) bool {
if pod == nil {
return false
}
if pod.Status.Reason == "OOMKilled" {
return true
}
Expand Down

0 comments on commit ef9d5a2

Please sign in to comment.