Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflows Operator (ex. Super-controller) #4790

Closed
alexec opened this issue Dec 21, 2020 · 11 comments
Closed

Workflows Operator (ex. Super-controller) #4790

alexec opened this issue Dec 21, 2020 · 11 comments

Comments

@alexec
Copy link
Contributor

alexec commented Dec 21, 2020

Summary

When managing Argo Workflows you must choose

  • Cluster-scoped install - single controller with lots of permissions and must be large for many workflows, but easy to manage
  • Namespace-scope - scales with the number of namespaces, and secured within the user's namespace, but hard to manage

What about a super-controller that installs the workflow controller just-in-time (i.e. whenever it sees a workflow created in a namespace) and uninstalls it when all workflows in that namespace are complete.


Message from the maintainers:

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

@alexec alexec added the type/feature Feature request label Dec 21, 2020
@sarabala1979
Copy link
Member

This is similar to what Argo-event does. Create the controller/executor on the namespace to process the resource.
In the workflow-controller scenario, it should deploy controller and RBACs on that namespace. Technically, Supercontroller should install the namespaced workflow-controller on each namespace if the namespace has a workflow

@alexec
Copy link
Contributor Author

alexec commented Dec 22, 2020

@sarabala1979 exactly what I think. I have an alternative solution too:

  • NamespaceSet - install a set of manifests into each namespace of a cluster
  • Zero-pod Autoscaler (ZPA) - scales a controller to zero if there are zero resources to control (back to 1 if there are). HPA then takes over.

These are deployment management tools. The downside is that by becoming general, we lose the ability to be specific.

@sarabala1979
Copy link
Member

sarabala1979 commented Dec 22, 2020

@alexec I think this approach is better than the master-slave/sharding approach. This can scale with any load with a distributing approach.

@sarabala1979
Copy link
Member

#4318

@alexec alexec changed the title Super-controller Workflows Operator --Super-controller-- Dec 22, 2020
@alexec alexec changed the title Workflows Operator --Super-controller-- Workflows Operator ~Super-controller~ Dec 22, 2020
@alexec alexec changed the title Workflows Operator ~Super-controller~ Workflows Operator (ex. Super-controller) Dec 22, 2020
@alexec
Copy link
Contributor Author

alexec commented Dec 22, 2020

I think this is just an https://coreos.com/operators/

@dcherman
Copy link
Member

Interesting idea! Off the top of my head, here's some initial thoughts:

  • This does make scaling easier if your workflows are (relatively) evenly distributed between namespaces, however if you end up with a hot namespace running the bulk of your workloads, you'd likely still end up needing to shard the workflow controller for that namespace.
  • How are secrets managed? If you have workflow archiving enabled, we would end up needing to create/destroy the secrets for s3/postgres/etc. in the corresponding namespaces, unless we just have these controllers be responsible for the executor of workflows, then have a separate deployment be responsible for workflow archiving.

@alexec
Copy link
Contributor Author

alexec commented Dec 23, 2020

hot namespace running the bulk of your workloads

I actually think "hot namespace" is the default. I don't think this feature can address scaling issues.

@alexec
Copy link
Contributor Author

alexec commented Dec 23, 2020

How are secrets managed?

I'm don't sure it can. A controller must have access to secret data (e.g. MySQL login), so either the operator can install this in any namespace, or you don't use it.

@alexec
Copy link
Contributor Author

alexec commented Dec 23, 2020

Some thoughts:

  • We only install the controller in explicitly labeled namespaces, rather than all. workflows.argoproj.io/controller: "true"
  • We can use annotations as extension point for customization:
    • workflows.argoproj.io/argo-server-ingress: "true" - install an ingress
    • workflows.argoproj.io/scale-to-zero: false - never scale to zero

@alexec alexec added the wontfix label Apr 16, 2021
@alexec
Copy link
Contributor Author

alexec commented Apr 16, 2021

This is basically going be the agent.

@alexec
Copy link
Contributor Author

alexec commented Nov 7, 2022

See #9990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants