-
Notifications
You must be signed in to change notification settings - Fork 31
Description
This has been on my mind for a while and I wanted to create an issue for the backlog.
Problem Statement
In the main controller-runtime
world, you usually run one controller instance per Kubernetes cluster. That results in some "natural" limit to scaling considerations since it's a single Kubernetes cluster. There are some solutions in the community to build sharded controllers.
multicluster-runtime
has an obvious challenge, and that is a huge amount of clusters creating a lot of load on the controller instance. Vertical scaling (increasing CPU and memory) will get you only so far. The obvious sharding boundary are the cluster.Cluster
engaged by multicluster-runtime.
Feature Description
It would be ideal to solve this problem at the multicluster-runtime level. I can see providers implementing options (e.g. label selectors) that help with manual or automated sharding specific to the provider (e.g. not all cluster fleets will be based on CRDs and such, a label selector won't work), but a generic solution you automatically get would be ideal and a real "selling point" for multicluster-runtime.
a mcmanager.Manager
instance could be configured to shard by cluster names, maybe creating some sort of hash ring to decide which manager instance is responsible for a particular cluster coming from the provider. There is also the possibility to require this from providers somehow, depending on whether we need information or awareness from providers, and have a secondary ShardedProvider
interface that provider implementations can optionally implement in addition to the Provider
one.