Helm Chart to define and run a Kubernetes scheduled task by defining a cronjob ojbect ☸.
namespace: "default"
image:
repository: alpine
pullPolicy: IfNotPresent
tag: 3.7
cron:
restartPolicy: Never
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 3
schedule: "*/10 * * * *"
startingDeadlineSeconds: 100
parallelism: 1
env:
- name: DB_NAME
value: "my_db"
command: ["sleep"]
args:
- 10
resources:
limits:
cpu: 1
memory: 200Mi
requests:
cpu: 0.5
memory: 100Mi
nodeSelector: {}
tolerations: []
affinity: {}-
Edit
values.yamlfile in order to setup your environment. -
First test installation with
--dry-runparameter. You can specify the namespace by using-nmodificator or alter any input parameter with--set=<PARAMETER:VALUE>. -
If definition works as expected remove the
--dry-runfrom the arguments.
$: helm install my-cronjob . --dry-run
NAME: my-cronjob
LAST DEPLOYED: Sun Aug 23 18:57:08 2020
NAMESPACE: default
STATUS: pending-install
REVISION: 1
TEST SUITE: None
HOOKS:
MANIFEST:
---
# Source: health-service/templates/cronjob.yaml
apiVersion: batch/v1beta1
kind: CronJob
...Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Module managed by Facu de la Cruz