Skip to content

⚠️ improve capi provider#130

Merged
k8s-ci-robot merged 4 commits into
kubernetes-sigs:mainfrom
guilhem:capinew
Feb 18, 2026
Merged

⚠️ improve capi provider#130
k8s-ci-robot merged 4 commits into
kubernetes-sigs:mainfrom
guilhem:capinew

Conversation

@guilhem
Copy link
Copy Markdown
Contributor

@guilhem guilhem commented Feb 6, 2026

Description

  • Refactors the CAPI provider to be constructed without a manager and configured via an explicit SetupWithManager.
  • Adds kubeconfig hashing to detect changes and re-engage clusters when configs rotate.
  • Improves cluster lifecycle management (cache sync, removal, indexers) and simplifies the startup flow.

Key changes

  • Updates the example to build the provider first, then create the multi-cluster manager, and start a single manager instance.
  • The provider now:
    • reads raw kubeconfig bytes and parses locally,
    • detects kubeconfig changes via SHA-256,
    • re-engages clusters when kubeconfig changes,
    • tracks engaged clusters with RW locks and exposes list functionality.
  • Field indexers apply to existing and future clusters without holding locks during indexing.

@k8s-ci-robot k8s-ci-robot requested review from embik and sttts February 6, 2026 18:17
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 6, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @guilhem!

It looks like this is your first PR to kubernetes-sigs/multicluster-runtime 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/multicluster-runtime has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 6, 2026
Signed-off-by: Guilhem Lettron <glettron@akamai.com>
Copy link
Copy Markdown
Member

@embik embik left a comment

Choose a reason for hiding this comment

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

Hey @guilhem, this is a great set of changes, thank you for bringing the CAPI provider more in line with the remaining providers in this repository. I have two comments.

In addition, I have a question: Your description has references (?) like F30844c7L94R94. What is that?

Comment thread providers/cluster-api/provider.go Outdated
Comment thread providers/cluster-api/provider.go Outdated
@guilhem
Copy link
Copy Markdown
Contributor Author

guilhem commented Feb 8, 2026

Hey @guilhem, this is a great set of changes, thank you for bringing the CAPI provider more in line with the remaining providers in this repository. I have two comments.

Thanks :)

I jsut how to fix tests.

In addition, I have a question: Your description has references (?) like F30844c7L94R94. What is that?

Copilot "tried" to generate a description
I changed to another

Copy link
Copy Markdown
Member

@embik embik left a comment

Choose a reason for hiding this comment

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

/approve

Looks great, thanks for the contribution! It's applying all of our learnings from other providers to the CAPI one, so apologies to users who this breaks for. But it's necessary before it diverges even more.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 18, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 8d1195cca751376c6c099c66924def2792ce063d

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik, guilhem

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2026
@embik
Copy link
Copy Markdown
Member

embik commented Feb 18, 2026

Note to release manager: This is a breaking change and should not go out in a patch release.

@k8s-ci-robot k8s-ci-robot merged commit 81cae17 into kubernetes-sigs:main Feb 18, 2026
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants