-
Notifications
You must be signed in to change notification settings - Fork 98
Use a field name selected cache #687
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
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
/hold We have to really verify that the number of apiserver queries drops |
3ae5e08
to
99ab801
Compare
/retest |
So from the printed events we can verify that handler at node01 receive only events related for that node
And the same for node02 handler.
|
The controller-runtime is missing filtering it's cache by labels or fields [1], this means that all the kubernetes-nmstate-handlers will read all the nodes and nodenetworkstates every period, clearly dies does not scale since kubernetes-nmstate-handler runs at as daemonset meaning that there is one handler running at every node so the bigger the cluster the bigger the problem. This change replace the default controller-runtime cache with an implementation that can be configured to use some field selectors depending on the resource, this way we can filter by "metadata.name" using the node name for "node" and "nodenetworkstate" so only one instance of them is feteched. [1] kubernetes-sigs/controller-runtime#244 Signed-off-by: Quique Llorente <[email protected]>
/hold cancel |
@qinqon: The following tests failed, say
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. I understand the commands that are listed here. |
@qinqon: PR needs rebase. 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. |
Is this a BUG FIX or a FEATURE ?:
/kind bug
What this PR does / why we need it:
The controller-runtime is missing filtering it's cache by labels or
fields [1], this means that all the kubernetes-nmstate-handlers will
read all the nodes and nodenetworkstates every period, clearly dies does
not scale since kubernetes-nmstate-handler runs at as daemonset meaning
that there is one handler running at every node so the bigger the
cluster the bigger the problem.
This change replace the default controller-runtime cache with an
implementation that can be configured to use some field selectors
depending on the resource, this way we can filter by "metadata.name"
using the node name for "node" and "nodenetworkstate" so only one
instance of them is feteched.
There is a PR at controller-runtime with a possible solution [2] in case something like that
make it to controller-runtime we will use that.
[1] kubernetes-sigs/controller-runtime#244
[2] kubernetes-sigs/controller-runtime#1404
Special notes for your reviewer:
Release note: