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

Resource API discovery results do not appear to come from a cache #451

Open
jessesuen opened this issue Aug 19, 2022 · 2 comments
Open

Resource API discovery results do not appear to come from a cache #451

jessesuen opened this issue Aug 19, 2022 · 2 comments

Comments

@jessesuen
Copy link
Member

It was discovered in #449 (comment) that controller was making 1M api calls to perform discovery.

The client-go does seem to provide a cached discovery option, but based on evidence of API calls, we may not be taking advantage of it

https://pkg.go.dev/k8s.io/client-go/discovery#CachedDiscoveryInterface

@crenshaw-dev
Copy link
Collaborator

This is a partial fix: https://github.com/argoproj/gitops-engine/pull/448/files

KubectlCmd calls that require GVK info instantiate and use a one-off discovery client. Fixing that will require a bigger refactor, so I left it for later.

@crenshaw-dev
Copy link
Collaborator

^ that fix pays no attention to the cluster changes which should invalidate the cache, so we probably shouldn't merge it as-is.

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

No branches or pull requests

2 participants