geonetwork / geonetwork-helm-charts

Repository for hosting helm charts regarding GeoNetwork organization.
3 stars 4 forks source link

Convert gn-tools-pipeline to cronjob #12

Open jeanmi151 opened 2 months ago

jeanmi151 commented 2 months ago

Convert this job https://github.com/geonetwork/geonetwork-helm-charts/blob/2fa3f6e30915998eb133f8ab2f42f525ca7650f8/gn-tools-pipelines/templates/gntoolspipelines-job.yaml into a cronjob in order to make it easier to trigger it.

edevosc2c commented 2 months ago

maybe have it automatically suspended state so that it is not triggered every X time?

jeanmi151 commented 2 months ago

we can make it run once

edevosc2c commented 2 months ago

a cronjob is designed to be run at a specific frequency. you can't run a cronjob once, if you want to run it once it's a job. it's like CRON on linux, you can't run a cron script once.

hence why I proposed to have it in a "suspend: true" state for avoiding it to be run every X time in order to suspend the CRON feature of the cronjob.

jeanmi151 commented 2 months ago

yeah but a job is boring to trigger actually, we could make it run automatically once a month

edevosc2c commented 2 weeks ago

ping @f-necas

f-necas commented 2 weeks ago

Not a k8s specialist but we can trigger it once a year ?

So it gets easiness of cronjob to redeploy and not running everytime.

The best would be a cronjob which checks if quality score is set, and if it doesn't, runs the pipeline.

edevosc2c commented 2 weeks ago

Why can't the pipeline just check if the "quality score" is correct and then proceed to fix that or not?

This way we can deploy it as a cronjob and have it being run every month for example.