-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Provide a truly lazy restmapper #1603
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/retitle Provide a truly lazy restmapper |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@alvaroaleman: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Currently, even the simplest controller (like https://github.com/kubernetes-sigs/controller-runtime/blob/master/examples/tokenreview/main.go#L40) will make a lot of API server calls at startup to setup the restmapping. In my relatively small cluster, this results in 75 API server calls which, with rate limiting, takes over 5s.
These calls are unnecessary in many cases - I don't need to get discovery info for my
acme
CRD when I am creating a TokenReview controller.There is an option,
WithLazyDiscovery
, that sounds like a solution, but it really just defers when we query the fully discovery listing until we start the client.It would be great to have an option that is per-resource lazy - so if we only read TokenReview we don't request all of the other groups. Even better, we can make core types baked in - I think its a safe assumption that the RestMapping for Pod, Service, etc is never changing (?)
The text was updated successfully, but these errors were encountered: