Merge pull request #10005 from hashicorp/tproxy-fixes

This commit is contained in:
Freddy 2021-04-13 11:45:40 -06:00 committed by GitHub
commit 1f119aec7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View File

@ -59,6 +59,7 @@ func (s *Server) clustersFromSnapshotConnectProxy(cfgSnap *proxycfg.ConfigSnapsh
// In transparent proxy mode there needs to be a passthrough cluster for traffic going to destinations // In transparent proxy mode there needs to be a passthrough cluster for traffic going to destinations
// that aren't in Consul's catalog. // that aren't in Consul's catalog.
if cfgSnap.Proxy.Mode == structs.ProxyModeTransparent && if cfgSnap.Proxy.Mode == structs.ProxyModeTransparent &&
cfgSnap.ConnectProxy.ClusterConfig != nil &&
!cfgSnap.ConnectProxy.ClusterConfig.TransparentProxy.CatalogDestinationsOnly { !cfgSnap.ConnectProxy.ClusterConfig.TransparentProxy.CatalogDestinationsOnly {
clusters = append(clusters, &envoy_cluster_v3.Cluster{ clusters = append(clusters, &envoy_cluster_v3.Cluster{

View File

@ -76,7 +76,6 @@ func (s *Server) listenersFromSnapshotConnectProxy(cInfo connectionInfo, cfgSnap
port = cfgSnap.Proxy.TransparentProxy.OutboundListenerPort port = cfgSnap.Proxy.TransparentProxy.OutboundListenerPort
} }
// TODO (freddy) Make DefaultTProxyOutboundPort configurable
outboundListener = makeListener(OutboundListenerName, "127.0.0.1", port, envoy_core_v3.TrafficDirection_OUTBOUND) outboundListener = makeListener(OutboundListenerName, "127.0.0.1", port, envoy_core_v3.TrafficDirection_OUTBOUND)
outboundListener.FilterChains = make([]*envoy_listener_v3.FilterChain, 0) outboundListener.FilterChains = make([]*envoy_listener_v3.FilterChain, 0)
outboundListener.ListenerFilters = []*envoy_listener_v3.ListenerFilter{ outboundListener.ListenerFilters = []*envoy_listener_v3.ListenerFilter{