Skip to content

Commit

Permalink
Allow job parallel running instead of replace
Browse files Browse the repository at this point in the history
When using concurrentPolicy=Replace and the job failed but haven't reach the backoff
limit, the new job will replace the original one if the schedule time is
less than the sum of the backoff time.

It causes a problem that the job alert
`kube_job_status_failed{job_name=~"refresh-credential.*",reason="BackoffLimitExceeded"}` can't be fired.

Signed-off-by: JenTing Hsiao <[email protected]>
  • Loading branch information
jenting committed Dec 15, 2022
1 parent c09d2f9 commit 2697c6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions install/installer/cmd/testdata/render/aws-setup/output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ func cronjob(ctx *common.RenderContext) ([]runtime.Object, error) {
Spec: batchv1.CronJobSpec{
Schedule: CronSchedule,
SuccessfulJobsHistoryLimit: pointer.Int32(1),
FailedJobsHistoryLimit: pointer.Int32(10),
ConcurrencyPolicy: batchv1.ReplaceConcurrent,
FailedJobsHistoryLimit: pointer.Int32(1),
ConcurrencyPolicy: batchv1.AllowConcurrent,
JobTemplate: batchv1.JobTemplateSpec{
ObjectMeta: objectMeta,
Spec: batchv1.JobSpec{
Expand Down

0 comments on commit 2697c6a

Please sign in to comment.