Skip to content

Commit 26550f4

Browse files
#238 Changed the condition for failed job to requiring exceding the specified BackoffLimit
BackoffLimit can be set in the values.yaml of scanners This allows that a scan is only considered as Failed if all "retries" have failed Co-authored-by: Boris Shek <boris.shek@iteratec.com> Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
1 parent 4cc9622 commit 26550f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • operator/controllers/execution/scans

‎operator/controllers/execution/scans/job.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func checkIfAllJobsCompleted(jobs *batch.JobList) jobCompletionType {
2929
hasCompleted := true
3030

3131
for _, job := range jobs.Items {
32-
if job.Status.Failed > 0 {
32+
if job.Status.Failed > *job.Spec.BackoffLimit {
3333
return failed
3434
} else if job.Status.Succeeded == 0 {
3535
hasCompleted = false

0 commit comments

Comments
 (0)