feat(cronjob): add cronjob activeDeadlineSeconds options

This commit is contained in:
weian
2022-09-30 14:38:16 +08:00
parent 4383dfb7a5
commit e62d31f8b9
3 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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`.

View File

@@ -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 }}