From fdd4b78172da06d980445683a036688628987a2a Mon Sep 17 00:00:00 2001 From: Dhia Ayachi Date: Thu, 23 Jun 2022 11:24:05 -0400 Subject: [PATCH] fix terminating gateway endpoint --- agent/xds/clusters.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/xds/clusters.go b/agent/xds/clusters.go index 5595a885f3..40619ee15a 100644 --- a/agent/xds/clusters.go +++ b/agent/xds/clusters.go @@ -276,9 +276,9 @@ func makePassthroughClusters(cfgSnap *proxycfg.ConfigSnapshot) ([]proto.Message, continue } for _, gateway := range gateways { - GatewayVip, ok := gateway.TaggedAddresses[structs.TaggedAddressLAN] + gatewayAddress, ok := gateway.ServiceTaggedAddresses[structs.TaggedAddressLANIPv4] if !ok { - GatewayVip = gateway.Address + continue } sni := connect.ServiceSNI( @@ -296,7 +296,7 @@ func makePassthroughClusters(cfgSnap *proxycfg.ConfigSnapshot) ([]proto.Message, ConnectTimeout: durationpb.New(5 * time.Second), } endpoints := []*envoy_endpoint_v3.LbEndpoint{ - makeEndpoint(GatewayVip, gateway.ServicePort), + makeEndpoint(gatewayAddress.Address, gatewayAddress.Port), } c.LoadAssignment = &envoy_endpoint_v3.ClusterLoadAssignment{