Hi! currently we migrate batch system to spring-cloud-dataflow.
SCDF doesn't support to update cronjob, workaround is to delete&re-create schedule (issue)
We use many scheduled tasks on spring-cloud-dataflow and I found that scheduled task doesn't support update.
And I found that update cronJob is not recommended by k8s side too (issue, issue2)
But, we need some way to update (or, at least suspend) scheduled tasks on below case.
Register scheduled task with app v1
✅ After we deploy new app v2, need to suspend(not delete immediately, wait until complete) scheduled tasks v1 and re-create with v2
We want to safe-delete scheduled task v1 after complete to run cronJob that currently running, so need suspend instead of delete (which immediately delete cronJob)
Solution description:
// SCDF SchdulerService
public void suspend(..) {
..
}
Problem description:
Hi! currently we migrate batch system to spring-cloud-dataflow.
We use many
scheduled tasks
on spring-cloud-dataflow and I found thatscheduled task
doesn't supportupdate
. And I found thatupdate cronJob
is not recommended by k8s side too (issue, issue2)But, we need some way to update (or, at least
suspend
) scheduled tasks on below case.app v1
app v2
, need tosuspend
(not delete immediately, wait until complete) scheduled tasks v1 and re-create with v2We want to safe-delete scheduled task v1 after complete to run cronJob that currently running, so need
suspend
instead of delete (which immediately delete cronJob)Solution description:
Add
suspend
API on DefaultSchedulerService and KubernetesScheduler.Then we can suspend v1 scheduled task by setSuspend on CronJobSpec.
Description of alternatives:
We want to safe-delete(delete after complete to run cronJob that currently running), so we can't use delete and need suspend or update.
But update is not recommended on k8s side so suspend API is proper solution I think!
Additional context:
X