-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xds: Add support for multiple addresses per endpoint #7858
xds: Add support for multiple addresses per endpoint #7858
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7858 +/- ##
==========================================
+ Coverage 81.69% 81.98% +0.28%
==========================================
Files 374 379 +5
Lines 37978 38261 +283
==========================================
+ Hits 31028 31367 +339
+ Misses 5638 5579 -59
- Partials 1312 1315 +3
|
e9a9a01
to
b196b5f
Compare
b196b5f
to
50ba981
Compare
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.
Haven't looked at the clusterresolver changes yet.
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.
Sorry for the delay in getting back to this PR.
This change adds support for endpoint resources with multiple addresses as part of implementing A61. The change reads the
AdditionalAddresses
field in the EDS resource. The parsing logic for theAdditionalAddresses
is the same as that for the primary address. Validation is added to ensure that primary and additional addresses are unique across all localities. The additional addresses are added ONLY toResolverState.Endpoints.Addresses
when the flag is enabled. LB policies that use theResolverState.Addresses
(e.g. round robin) will not see any change in behaviour. Such LB policies will be updated later to delegate to the new leafpickfirst
LB policy to support endpoints.A61 mentions that the code to read the new field should be protected by an environment variable flag named
GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS
which will be removed once the dualstack support is proven stable. This PR adds a hardcoded boolen variable which will be read from the environment all LB policies handle endpoints.This PR also reactors parts of clusterresolver to pass around a slice of
resolver.Endpoints
instead of a slice of address strings/addresses. This is required to retain the endpoint grouping. The endpoints list is flattened to an address list to ensure resolver states contain both addresses and endpoints.RELEASE NOTES: N/A