Skip to content

Latest commit

 

History

History
75 lines (65 loc) · 2.04 KB

README.md

File metadata and controls

75 lines (65 loc) · 2.04 KB

helm-cronjob template

https://github.com/fmdlc/helm-cronjob/actions https://github.com/fmdlc/helm-cronjob/issues https://github.com/fmdlc/helm-cronjob/blob/master/LICENSE

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: {}

Usage

  1. Edit values.yaml file in order to setup your environment.

  2. First test installation with --dry-run parameter. You can specify the namespace by using -n modificator or alter any input parameter with --set=<PARAMETER:VALUE>.

  3. If definition works as expected remove the --dry-run from 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
...

Contributing

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.

Authors

Module managed by Facu de la Cruz

License

Apache 2.0