POC: Move cluster-specific code out of the manager#950
POC: Move cluster-specific code out of the manager#950alvaroaleman wants to merge 3 commits intokubernetes-sigs:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alvaroaleman The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@alvaroaleman: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
We integrated your POC into our controller and found it quite helpful to have support for additional cluster connections without creating additional managers.
|
|
@alvaroaleman: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/assign |
|
After seeing more and more use cases similar to #745 (comment), IMO this proposal is useful and promising. I haven't really dived into the implementation details, but I'd like to see this get finalized and merged. |
|
@mengqiy so what do you think is the best way forward for this, should I write a design doc that outlines the changes to make it more digestible? |
|
+1 to have a design doc, it'd also be helpful to visualize and document the structure of the project when we merge this in |
|
You may want to write a design doc in the designs folder. @DirectXMan12 @joelanford @estroz Does anyone have concerns or objection? |
|
@mengqiy sgtm, will take time to review the doc once its up. Great stuff so far. |
|
Created a PR for a design doc in #1075 |
|
Closing as the design doc got merged and describes what we want to do here |

This PR is a POC that aims to improve the multi cluster story with controller-runtime. While multi-cluster controllers are already possible today, they are awkward, because they require to either:
Runnableand add it to the managerAdditionally, startup is incorrect as we don't start secondary caches ahead of time.
So the goal here is basically:
The commits are:
pkg/managertopkg/clusterconnector(Better name ideas welcome!)The PR is huge because there was so much code to move. The most important parts to look at are:
pkg/manager.Managerthat now embedds the cluster-specificspkg/clusterconnector.Clusterconnectorwhich contains the cluster-specificsexamples/multicluster/reconciler.Addto see how such a multi cluster controller looks likeIf we can agree on the idea, I will create separate PRs for each of the commits.
Would love to hear opinions on this!
/assign @estroz @DirectXMan12 @vincepri @alexeldeib