I've more that 10 CronJobs configured in Kubernetes and all working properly as expected.
Now I am planning add 20 more CronJobs. All jobs getting data from external resources, processing it and generating some kind of reports.
I want to configure schedule expression of CronJobs into ConfigMap. for example something like,
kind: ConfigMap
apiVersion: v1
metadata:
name: scheduler-config
namespace: test
data:
job1.schedule.expression: */1 * * * *
job2.schedule.expression: */5 * * * *
job3.schedule.expression: */30 * * * *
job4.schedule.expression: 0 1 * * *
job5.schedule.expression: 0 0 * * THU
I want to make it more flexible if possible, for example if I update the ConfigMap with new expression then CronJob should be updated with new schedule expression and next time it should run as per new expression value in ConfigMap.