-
Notifications
You must be signed in to change notification settings - Fork 630
Order the endpoint addresses for the ingress-use-waypoint #13085
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
Order the endpoint addresses for the ingress-use-waypoint #13085
Conversation
Signed-off-by: Yossi Mesika <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements DNS lookup family support for ingress-use-waypoint cluster configurations in the waypoint plugin. It adapts the existing KGW_DNS_LOOKUP_FAMILY setting behavior to static clusters by sorting addresses based on IP family preferences (IPv4/IPv6) and using Envoy's AdditionalAddresses field to maintain the ordered list.
Key changes:
- Added DNS lookup family-aware address sorting for static waypoint clusters
- Restructured endpoint creation to support primary + additional addresses
- Added comprehensive unit tests for the address sorting logic
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/kgateway/extensions2/plugins/waypoint/plugin.go | Added sortAddressesByDnsLookupFamily function to sort addresses by IP family preference, refactored claEndpoint to support multiple addresses via AdditionalAddresses, and updated processIngressUseWaypoint to use sorted addresses |
| pkg/kgateway/extensions2/plugins/waypoint/plugin_test.go | Added comprehensive unit tests for sortAddressesByDnsLookupFamily covering all DNS lookup family modes (V4_PREFERRED, V6_ONLY, V4_ONLY, AUTO, ALL) and edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Yossi Mesika <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Signed-off-by: Yossi Mesika <[email protected]>
Description
This PR is basically adapting the behavior of the
KGW_DNS_LOOKUP_FAMILYsetting on the static cluster that has the service VIPs endpoint.It uses the
AdditionalAddressesto add as sorted list of addresses based on the settings mode.By default the mode is
V4_PREFERREDwhich adds the IPv4 as the first addresses followed by the IPv6 (if exist).E.g. of an output cluster:
Fixes #13084
Change Type
/kind fix
Changelog
Additional Notes