Skip to content

Commit 110a273

Browse files
committed
grpc-js-xds: Combine endpoints for LOGICAL_DNS clusters
1 parent 7ab3da2 commit 110a273

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)