Skip to content

Conversation

@m-szalik
Copy link

What

  • An extension to track connected cluster names.
  • An usage example.

Why
If you want to synchronize resource between clusters you need to connect to each cluster and create/update or delete the
resource on each cluster. To be able to get k8s client for the cluster you need to know it's name.
This extension allows you to get list of names of connected clusters.

Changes
Extension added.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 20, 2025

CLA Signed
The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot requested review from skitt and sttts October 20, 2025 22:53
@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Oct 20, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @m-szalik!

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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 20, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 20, 2025
@m-szalik m-szalik changed the title Cluster registry - an extention that allows you to track connected cluster names Non-breaking feature: Cluster registry - an extention that allows you to track connected cluster names Oct 20, 2025
@m-szalik m-szalik changed the title Non-breaking feature: Cluster registry - an extention that allows you to track connected cluster names (:sparkles:) Cluster registry - an extention that allows you to track connected cluster names Oct 20, 2025
@m-szalik m-szalik changed the title (:sparkles:) Cluster registry - an extention that allows you to track connected cluster names ✨ Cluster registry - an extention that allows you to track connected cluster names Oct 20, 2025
@ntnn
Copy link
Member

ntnn commented Oct 21, 2025

Theres already clusters.Clusters which basically has the ClusterNames functionality.

Maybe add a clusters.Registry in pkg/clusters like this:

type Registry struct {
	Clusters
}

func (r *Registry) Engage(ctx context.Context, name string, cl cluster.Cluster) error {
	return cr.Add(ctx, name, cl, nil)
}

And adjust the example for clusters.Registry. Less overhead overall.

Edit: Might be better to not reuse Clusters now that I think about it, it will try to start the cluster and depending on the implementation that could error.
Regardless of that I think clusters.Registry would be preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants