argoproj / argo-workflows

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

[Proposal] Support scale subresource in CRDs #5189

Open JPZ13 opened 3 years ago

JPZ13 commented 3 years ago

Summary

Support the scale subresource in the different Argo workflows CRDs

Use Cases

Not having the scale subresource makes it difficult to use existing autoscalers like the vertical pod autoscaler. When running Argo in a multi-tenant environment, if a workflow definition does not have the appropriate resource requests and limits set, sudden spikes in CPU usage can cause pods to be evicted both for the workflow causing the spike and other tenants on the cluster. Having the scale subresource will allow autoscalers to spin up more nodes to handle any spikes.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

alexec commented 3 years ago

Interesting. What would the outcome of kubectl scale workflow/my-wf --replicas 3 be?

JPZ13 commented 3 years ago

Good question. I think we could disable the scaling of workflows directly but still support the labelSelector so that autoscalers can make recommendations and have info about pod sizing. Maybe kubectl scale workflow/my-wf --replicas 3 would give error: Workflow replica size must be 1 or something of that nature. What are your thoughts?

alexec commented 3 years ago

I felt like it would change the spec.parallelism flag?

JPZ13 commented 3 years ago

I felt like it would change the spec.parallelism flag?

I like that setup a lot. Thanks for calling that out

alexec commented 3 years ago

Would you like to submit a PR?

JPZ13 commented 3 years ago

Yep! I'm on it