Skip to content

opt: Cache managed-cluster clients via libsveltos clustercache#489

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:clustercache
Jul 18, 2026
Merged

opt: Cache managed-cluster clients via libsveltos clustercache#489
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:clustercache

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

classifier previously called clusterproxy.GetKubernetesClient/GetKubernetesRestConfig directly, which builds a new rest.Config, discovery client, and RESTMapper via a live discovery round-trip on every call. Switches to the shared lib/clustercache.GetManager() from libsveltos so these are cached, matching addon-controller, event-manager, and healthcheck-manager. Also calls InvalidateOnAuthError in the deployer-result path so a cached client gets evicted as soon as the API server starts rejecting credentials (401/403) instead of only on TTL expiry or cluster deletion.

classifier previously called clusterproxy.GetKubernetesClient/GetKubernetesRestConfig
directly, which builds a new rest.Config, discovery client, and RESTMapper via a live
discovery round-trip on every call. Switches to the shared lib/clustercache.GetManager()
from libsveltos so these are cached, matching addon-controller, event-manager, and
healthcheck-manager. Also calls InvalidateOnAuthError in the deployer-result path so a
cached client gets evicted as soon as the API server starts rejecting credentials
(401/403) instead of only on TTL expiry or cluster deletion.
@gianlucam76
gianlucam76 merged commit 6087b17 into projectsveltos:main Jul 18, 2026
9 checks passed
@gianlucam76
gianlucam76 deleted the clustercache branch July 18, 2026 11:37
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 this pull request may close these issues.

1 participant