-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Migrate to EndpointSlices API #10664
base: master
Are you sure you want to change the base?
Conversation
Hello @jnoordsij, Thank you for your contribution. I can see your PR is in draft. Thanks in advance for your feedback. |
Any early comments or suggestions are welcome, but given some tests are still failing and I'm aiming to write down a more descriptive summary and list of important changes, a thorough review is probably something to only do at a later point. I'll hope to continue working on this soon. Yet like I said, any comments, concerns or suggestions are welcome in the meantime! |
Hello @jnoordsij, Thank you for the answer. |
f20a319
to
ada644c
Compare
ada644c
to
a419493
Compare
@nmengin I think this is all ready for a first review right now! |
What does this PR do?
Switch to Kubernetes EndpointSlices API as described in #10638.
Motivation
Discovered existence of this API while looking into behavior regarding non-ready service endpoints still being served traffic. Although this change will probably make little changes in that regard, it's probably still a technical improvement that allows for more features in the future and still might slightly improve performance.
See also:
More
Additional Notes
Important changes
EndpointSlice
API graduated to stable; see also the integration test version bump.pkg/provider/kubernetes/k8s/event_handler.go
, the change-detection method has been heavily simplified, to use Go-native reflect for comparison. This might come at a little performance overhead, but is definitely more future-proof, as I would think this check could otherwise very well go unnoticed when the API might change in the future.Upgrade notes
docs/content/getting-started/quick-start-with-kubernetes.md
)Possible improvements
Possible follow-ups
The following ideas should now be implementable; however how easy and/or useful this is, I'm not sure about:
Also deduplication of some logic (e.g. Kubernetes resource querying, label selector creation and endpoint parsing) and/or tests would probably be something worth taking up here, although I have not thought about if and how to achieve this.