We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a09f116 + bb77142 commit 31f8b5eCopy full SHA for 31f8b5e
pkg/controller/build/imagebuilder/jobimagebuilder.go
@@ -329,7 +329,7 @@ func (j *jobImageBuilder) validateBuilderType(builder buildrequest.Builder) erro
329
func MapJobStatusToBuildStatus(job *batchv1.Job) (mcfgv1.BuildProgress, []metav1.Condition) {
330
// If the job is being deleted and it was not in either a successful or failed state
331
// then the MachineOSBuild should be considered "interrupted"
332
- if job.DeletionTimestamp != nil && job.Status.Succeeded == 0 && job.Status.Failed == 0 {
+ if job.DeletionTimestamp != nil && job.Status.Succeeded == 0 && job.Status.Failed < constants.JobMaxRetries+1 {
333
return mcfgv1.MachineOSBuildInterrupted, apihelpers.MachineOSBuildInterruptedConditions()
334
}
335
0 commit comments