-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
feat: use indexer to retrieve endpointslices directly by service name #11333
base: main
Are you sure you want to change the base?
feat: use indexer to retrieve endpointslices directly by service name #11333
Conversation
…ering them for each service
The committers listed above are authorized under a signed CLA. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: defaulterrr 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 |
Welcome @defaulterrr! |
Hi @defaulterrr. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
✅ Deploy Preview for kubernetes-ingress-nginx canceled.
|
/uncc |
/kind feature |
/assign |
Hello! I was wondering whether anyone has been able to take a look at this PR.. is there anything i can do to ease the process of merging these changes to the master? As far as i can see, this is still not a breaking change even for latest releases of the controller I saw that this issue was discussed at the weekly SIG meetings, but couldn't find any notes on the topic :( |
What this PR does / why we need it:
Why is this change required? What problem does it solve?
This contribution increases overall performance of the sync portion in the controller for clusters with large amounts of services and endpointslices. Previously, for each service controller would list all endpointslices in it's storer (which may contain thousands of objects) and filter them using some string magic that is based on the internals of how endpointslice controller works on the control plane side. This is bad in both terms of performance and future-proofness:
Also, while fixing the failing tests, i've found that some of the tests were logically incorrect - as in they were not matching slices that were owned by requested service.
What i've done
"kubernetes.io/service-name"
How Has This Been Tested?
This change alters the internal behaviour of the controller, but does not affect user-facing behaviours, so no new tests are required in my opinion. I've updated & fixed tests that were covering this section of the code. As i've changed one of the test cases
"the key exists"
i'd like to confirm that following is the expected behaviour:MatchByKey function will return all endpointslices that were created by the provided service key, as in were created and are in the same namespace as this service
. Previous test case was not matching this condition as one of the endpointslices created by the same service was not returned (and so ingress-controller would not pass it's endpoints to the nginx).Checklist: