Skip to content

CronJob

Appears in

  • .Values.workload.$name

schedule

Define the schedule

Keyworkload.$name.schedule
Typestring
Required
Helm tpl
Default""

Example

workload:
workload-name:
schedule: "{{ .Values.cron }}"

timezone

Define the timezone

Keyworkload.$name.timezone
Typestring
Required
Helm tpl
DefaultSee here

Example

workload:
workload-name:
timezone: "{{ .Values.someTimezone }}"

concurrencyPolicy

Define the concurrencyPolicy

Keyworkload.$name.concurrencyPolicy
Typestring
Required
Helm tpl
DefaultForbid

Valid Values:

  • Allow
  • Replace
  • Forbid

Example

workload:
workload-name:
concurrencyPolicy: Allow

failedJobsHistoryLimit

Define the failedJobsHistoryLimit

Keyworkload.$name.failedJobsHistoryLimit
Typeint
Required
Helm tpl
Default1

Example

workload:
workload-name:
failedJobsHistoryLimit: 2

successfulJobsHistoryLimit

Define the successfulJobsHistoryLimit

Keyworkload.$name.successfulJobsHistoryLimit
Typeint
Required
Helm tpl
Default3

Example

workload:
workload-name:
successfulJobsHistoryLimit: 4

startingDeadlineSeconds

Define the startingDeadlineSeconds

Keyworkload.$name.startingDeadlineSeconds
Typeint
Required
Helm tpl
Defaultunset

Example

workload:
workload-name:
startingDeadlineSeconds: 100

completionMode

Define the completionMode

Keyworkload.$name.completionMode
Typestring
Required
Helm tpl
DefaultNonIndexed

Valid Values:

  • Indexed
  • NonIndexed

Example

workload:
workload-name:
completionMode: Indexed

backoffLimit

Define the backoffLimit

Keyworkload.$name.backoffLimit
Typeint
Required
Helm tpl
Default5

Example

workload:
workload-name:
backoffLimit: 5

completions

Define the completions

Keyworkload.$name.completions
Typeint
Required
Helm tpl
Defaultunset

Example

workload:
workload-name:
completions: 5

parallelism

Define the parallelism

Keyworkload.$name.parallelism
Typeint
Required
Helm tpl
Default1

Example

workload:
workload-name:
parallelism: 5

ttlSecondsAfterFinished

Define the ttlSecondsAfterFinished

Keyworkload.$name.ttlSecondsAfterFinished
Typeint
Required
Helm tpl
Default120

Example

workload:
workload-name:
ttlSecondsAfterFinished: 100

activeDeadlineSeconds

Define the activeDeadlineSeconds

Keyworkload.$name.activeDeadlineSeconds
Typeint
Required
Helm tpl
Defaultunset

Example

workload:
workload-name:
activeDeadlineSeconds: 100

Full Examples

workload:
workload-name:
enabled: true
primary: true
type: CronJob
schedule: "{{ .Values.cron }}"
timezone: "{{ .Values.someTimezone }}"
concurrencyPolicy: Allow
failedJobsHistoryLimit: 2
successfulJobsHistoryLimit: 4
startingDeadlineSeconds: 100
backoffLimit: 5
completionMode: Indexed
completions: 5
parallelism: 5
ttlSecondsAfterFinished: 100
activeDeadlineSeconds: 100
podSpec:
restartPolicy: OnFailure
other-workload-name:
enabled: true
primary: false
type: CronJob
schedule: "* * * * *"
podSpec: {}