argoproj / argo-workflows

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

Add `cronWorkflowDefaults` #12627

Open rwong2888 opened 7 months ago

rwong2888 commented 7 months ago

Summary

What change needs making?

There is a workflow default, but not one for crons.

Use Cases

When would you use this?

Setting CronWorkflow history limits mentioned in the Cost Optimization doc cannot be set globally. It would be nice to have this option similar to the Workflow Defaults.


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritize the proposals with the most 👍.

agilgur5 commented 7 months ago

Follow-up to this Slack thread, for posterity.

As I noted there, I think this could be useful for other CronWorkflow configurations that one might want to configure globally, such as timezone, concurrencyPolicy, startingDeadlineSeconds etc.

For native k8s CronJobs, I thought there was a flag you could set in k8s to change the default, but I couldn't find that in a quick search.

Also, the workaround for this is to have a policy engine (OPA Gatekeeper, Kyverno, etc) detect new CronWorkflows and set these if they were not explicitly set by the user.