Skip to content

Commit

Permalink
Set limit for job ActiveDeadlineSeconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Sheiko committed Aug 25, 2021
1 parent 0d1945f commit 91b885a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/app2kube/cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ func (app *App) GetCronJobs() (crons []*batch.CronJob, err error) {
job.SuccessfulJobsHistoryLimit = 2
}

if job.ActiveDeadlineSeconds == 0 {
job.ActiveDeadlineSeconds = 86400 // 1 day
}

if job.BackoffLimit == 0 {
job.BackoffLimit = 6
}
Expand Down

0 comments on commit 91b885a

Please sign in to comment.