Skip to content

refactor: update cronjob template

Boros Gábor requested to merge gabor/add-cron-jobs into main

Description

This MR adds the possibility to run Kubernetes-based cron jobs. This is not capable of running any custom scripts (unless the script is packaged with the docker image).

Supporting information

https://tasks.opencraft.com/browse/SE-5878

Testing instructions

Steps to test the changes:

  1. Check that cron jobs are green: https://cloud.digitalocean.com/kubernetes/clusters/ba4c9867-e72c-4ce7-b7df-98f01e3a481b/db/e665a52d-b474-4257-b9f9-f553cd2a8f57/#/cronjob?namespace=gabor-test
  2. Check that pipeline is green https://gitlab.com/opencraft/ops/grove-stage-digitalocean/-/jobs/3690434404
  3. Check the kubernetes output of:
    ❯ kubectl get cronjob -A
    NAMESPACE    NAME                    SCHEDULE       SUSPEND   ACTIVE   LAST SCHEDULE   AGE
    gabor-test   cron-job-diffsettings   */10 * * * *   False     1        2m53s           8m18s
    gabor-test   cron-job-hello-world    */20 * * * *   False     1        2m53s           8m18s

Dependencies

N/A

Screenshots

Screenshot_2023-01-31_at_17.22.39

Checklist

If any of the items below is not applicable, do not remove them, but put a check in it.

  • Git commit history is clean
  • Git commits are following conventional-commit practices
  • Unit tests are added/updated
  • Documentation is added/updated

Additional context

N/A

Merge request reports