-
Notifications
You must be signed in to change notification settings - Fork 1.2k
POC: Move cluster-specific code out of the manager #950
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
POC: Move cluster-specific code out of the manager #950
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.
Needs 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. Instructions 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. Instructions 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:
Runnable
and 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/manager
topkg/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.Manager
that now embedds the cluster-specificspkg/clusterconnector.Clusterconnector
which contains the cluster-specificsexamples/multicluster/reconciler.Add
to 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