Switch to multicluster-runtime and make controllers and controllers groups importable - #285
Switch to multicluster-runtime and make controllers and controllers groups importable#285ntnn wants to merge 8 commits into
Conversation
Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
…gagement Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
SimonTheLeg
left a comment
There was a problem hiding this comment.
some smaller comments from my end.
All in all, it is a pretty large PR without any changes to the functionality of the operator. But I see how this allows for either building custom operators or change this in the future, when we want to go to multi-region.
| func (r *FrontProxyReconciler) SetupWithManager(mgr ctrl.Manager) error { | ||
| rootShardHandler := handler.TypedEnqueueRequestsFromMapFunc(func(ctx context.Context, obj ctrlruntimeclient.Object) []reconcile.Request { | ||
| func (r *FrontProxyReconciler) SetupWithManager(mgr mcmanager.Manager) error { | ||
| rootShardHandler := util.EnqueueMapped(func(ctx context.Context, client ctrlruntimeclient.Client, obj ctrlruntimeclient.Object) []reconcile.Request { |
There was a problem hiding this comment.
maybe slightly off-topic question, but since you are the multi-cluster runtime expert :)
Is there a reason why we don't have a handler.TypedEnqueueRequestsFromMapFunc equivalent in multicluster runtime. Wouldn't that util function that we now declare here better placed directly in mc?
There was a problem hiding this comment.
Yeah and I have added it as a todo to my list but I'd first make it a workaround here before making the PR to mcr without seeing if there are any side effects showing from this.
I don't think there will be but better safe than sorry :D
Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Summary
Follow up to adding deploy.operator.kcp.io and splitting the controllers into two controller groups.
This makes the machinery available to importers so the controller groups can be embedded by other operators and fed with multicluster providers.
Each commit is one change, especially changing e.g. the clients is a purely mechanical - I'd recommend to view each commit on its own.
What Type of PR Is This?
/kind feature
Related Issue(s)
Fixes #
Release Notes