Skip to content

Switch to multicluster-runtime and make controllers and controllers groups importable - #285

Open
ntnn wants to merge 8 commits into
kcp-dev:mainfrom
ntnn:mcr-controllers
Open

Switch to multicluster-runtime and make controllers and controllers groups importable#285
ntnn wants to merge 8 commits into
kcp-dev:mainfrom
ntnn:mcr-controllers

Conversation

@ntnn

@ntnn ntnn commented Aug 7, 2026

Copy link
Copy Markdown
Member

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

Switch to multicluster-runtime and make controllers and controllers groups importable

ntnn added 7 commits August 7, 2026 08:55
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>
@kcp-ci-bot kcp-ci-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Aug 7, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign sttts for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 7, 2026

@SimonTheLeg SimonTheLeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkg/controller/util/test.go
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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants