Browse Source

fix bug that resulted in generating Envoy configs that use CDS with an EDS configuration

pull/15140/head
Eric 2 years ago
parent
commit
bf691461a0
  1. 10
      agent/xds/clusters.go
  2. 8
      agent/xds/testdata/clusters/mesh-gateway-with-imported-peered-services.latest.golden

10
agent/xds/clusters.go

@ -629,9 +629,15 @@ func (s *ResourceGenerator) makeGatewayOutgoingClusterPeeringServiceClusters(cfg
// usual mesh gateway route for a service.
clusterName := node.Service.Connect.PeerMeta.PrimarySNI()
var hostnameEndpoints structs.CheckServiceNodes
if serviceGroup.UseCDS {
hostnameEndpoints = serviceGroup.Nodes
}
opts := clusterOpts{
name: clusterName,
isRemote: true,
name: clusterName,
isRemote: true,
hostnameEndpoints: hostnameEndpoints,
}
cluster := s.makeGatewayCluster(cfgSnap, opts)

8
agent/xds/testdata/clusters/mesh-gateway-with-imported-peered-services.latest.golden vendored

@ -5,14 +5,6 @@
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster",
"name": "alt.default.default.peer-b.external.1c053652-8512-4373-90cf-5a7f6263a994.consul",
"type": "LOGICAL_DNS",
"edsClusterConfig": {
"edsConfig": {
"ads": {
},
"resourceApiVersion": "V3"
}
},
"connectTimeout": "5s",
"loadAssignment": {
"clusterName": "alt.default.default.peer-b.external.1c053652-8512-4373-90cf-5a7f6263a994.consul",

Loading…
Cancel
Save