Skip to content

Support for controllers spanning across clusters #745

@loewenstein

Description

@loewenstein

We have a use case for a controller responsible for a (custom) resource A in one cluster that kind of owns another (custom) resource B in another cluster. I say "kind of owns" because there are of course no owner references that span clusters, but it can be imitated with labels and a mapping event handler rather easily.

The problem is that there is no easy way to configure the controller to watch for Bs in that there client.

  • A 'Kind' source would look for Bs in the wrong cluster.
  • I suppose it could work with a separate manager and controller with no reconciler who's only purpose is to setup a watch and provide an Informer for an Informer source.
    Not sure if that would really work though, we would have a controller that prepends to reconcile Bs and we would need a dummy reconciler. Feels like a hack.
  • we could probably use a Channel source, create our own client using client-go and feed events. However, this sounds like a lot of work/custom code, I am not sure how well it would integrate with the rest of controller-runtime

Could we instead have a manager that can have n clients and way that kind watches can specify which client to use?

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/designCategorizes issue or PR as related to design.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions