From e62d31f8b9753948b695b5a137469ba7b4c27f47 Mon Sep 17 00:00:00 2001 From: weian Date: Fri, 30 Sep 2022 14:38:16 +0800 Subject: [PATCH] feat(cronjob): add cronjob activeDeadlineSeconds options --- Chart.yaml | 2 +- README.md | 1 + templates/_cronjob.yaml | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 39cf296..a4638b2 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -14,4 +14,4 @@ type: library # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 1.1.0 +version: 1.2.0 diff --git a/README.md b/README.md index 6e3d1f9..1cb43a2 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,7 @@ In addition, it uses the following configuration from the `$cronJob`: | `$cronJob.failedJobsHistoryLimit` | [optional] Specify the number of failed jobs to keep | | `$cronJob.successfulJobsHistoryLimit` | [optional] Specify the number of completed jobs to keep | | `$cronJob.suspend` | [optional] Specify cronjob is suspend, default false | +| `$cronJob.activeDeadlineSeconds` | [optional] Specify cronjob activeDeadlineSeconds | Underneath the hood, it invokes [`common.pod.template`](#commonpodtemplate) template with `$pod` to populate the `PodTemplate`. diff --git a/templates/_cronjob.yaml b/templates/_cronjob.yaml index 6761abf..e6a1333 100644 --- a/templates/_cronjob.yaml +++ b/templates/_cronjob.yaml @@ -37,6 +37,9 @@ spec: labels: {{- include "common.selectorLabels" $top | nindent 8 }} spec: + {{- with $cronJob.activeDeadlineSeconds }} + activeDeadlineSeconds: {{ . }} + {{- end }} template: {{- include "common.pod.template" (list $top $pod $serviceAccount "common.cronJob.pod") | nindent 8 }} {{- end }}