argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.13k stars 3.21k forks source link

blackout time support #7868

Open tooptoop4 opened 2 years ago

tooptoop4 commented 2 years ago

Summary

allow configuring ALL CronWorkflows (or even normal workflows) with a time range that they CANNOT start inside

Use Cases

My target DB that my workflows write data to has a weekly outage at a pre-defined 30 minute block

terrytangyuan commented 2 years ago

You can set suspend to true for your CronWorkflow before the outage.

tooptoop4 commented 2 years ago

@terrytangyuan that sounds manual to suspend/unsuspend every week (our org would require change management paperwork too), but if time range is set would be automated.

terrytangyuan commented 2 years ago

How about another CronWorkflow that patches the suspend field in other existing CronWorkflow before the outage?

tooptoop4 commented 2 years ago

not sure how that would look like? you mean some bot that commits the change on git?

terrytangyuan commented 2 years ago

One CronWorkflow’s spec could contain a resource template that runs kubectl patch to another CronWorkflow’s suspend field.

tooptoop4 commented 2 years ago

wouldn't argocd's auto sync then try to overwrite it with what git has?

terrytangyuan commented 2 years ago

You can ignore diff from specified fields. Check this out: https://blog.argoproj.io/new-sync-and-diff-strategies-in-argocd-44195d3f8b8c