Skip to content
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

Consider using ClusterCacheTracker instead of remote.NewClusterClient #2053

Closed
sbueringer opened this issue Jul 20, 2023 · 2 comments · Fixed by #2132
Closed

Consider using ClusterCacheTracker instead of remote.NewClusterClient #2053

sbueringer opened this issue Jul 20, 2023 · 2 comments · Fixed by #2132
Assignees

Comments

@sbueringer
Copy link
Member

sbueringer commented Jul 20, 2023

I think we should consider using the ClusterCacheTracker from core CAPI which caches Clients and RESTConfig for a cluster across reconciles. The main advantage is that we don't have to construct a client on each reconcile.

Currently we have a few places where we are using remote.NewClusterClient instead:

image

An example on how to setup the ClusterCacheTracker can be seen here: https://github.com/kubernetes-sigs/cluster-api/blob/main/main.go#L372-L395

@sbueringer sbueringer changed the title Consider using ClusterCacheTracker instead of remote.NewClusterClient, ... Consider using ClusterCacheTracker instead of remote.NewClusterClient Jul 20, 2023
@laozc
Copy link
Member

laozc commented Aug 1, 2023

I can take over this issue.

@sbueringer
Copy link
Member Author

Perfect, thx!

/assign @laozc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants