Skip to content

Commit 7548f41

Browse files
authored
Merge pull request #2965 from murgatroid99/grpc-js-xds_dns_no_special_case
grpc-js-xds: Combine endpoints for LOGICAL_DNS clusters
2 parents 7ab3da2 + 110a273 commit 7548f41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/grpc-js-xds/src/xds-dependency-manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ function getEdsResource(edsUpdate: ClusterLoadAssignment__Output): EndpointResou
323323
}
324324

325325
function getDnsResource(endpoints: Endpoint[]): EndpointResource {
326+
const endpoint: Endpoint = {
327+
addresses: endpoints.map(endpoint => endpoint.addresses).flat()
328+
}
326329
return {
327330
priorities: [{
328331
localities: [{
@@ -332,7 +335,7 @@ function getDnsResource(endpoints: Endpoint[]): EndpointResource {
332335
sub_zone: ''
333336
},
334337
weight: 1,
335-
endpoints: endpoints.map(endpoint => ({endpoint: endpoint, weight: 1}))
338+
endpoints: [{endpoint: endpoint, weight: 1}]
336339
}]
337340
}],
338341
dropCategories: []

0 commit comments

Comments
 (0)