Avoid adding original_dst filter when not needed (#10302)
This commit is contained in:
parent
6bdaf72085
commit
7cfd7e9ec1
4
.changelog/10302.txt
Normal file
4
.changelog/10302.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
```release-note:improvement
|
||||||
|
connect: Avoid adding original_dst listener filter when it won't be used.
|
||||||
|
```
|
||||||
|
|
|
@ -78,12 +78,6 @@ func (s *ResourceGenerator) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg.
|
||||||
|
|
||||||
outboundListener = makePortListener(OutboundListenerName, "127.0.0.1", port, envoy_core_v3.TrafficDirection_OUTBOUND)
|
outboundListener = makePortListener(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{
|
|
||||||
{
|
|
||||||
// TODO (freddy): Hard-coded until we upgrade the go-control-plane library
|
|
||||||
Name: "envoy.filters.listener.original_dst",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var hasFilterChains bool
|
var hasFilterChains bool
|
||||||
|
@ -207,6 +201,13 @@ func (s *ResourceGenerator) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg.
|
||||||
if cfgSnap.ConnectProxy.MeshConfig == nil ||
|
if cfgSnap.ConnectProxy.MeshConfig == nil ||
|
||||||
!cfgSnap.ConnectProxy.MeshConfig.TransparentProxy.CatalogDestinationsOnly {
|
!cfgSnap.ConnectProxy.MeshConfig.TransparentProxy.CatalogDestinationsOnly {
|
||||||
|
|
||||||
|
outboundListener.ListenerFilters = []*envoy_listener_v3.ListenerFilter{
|
||||||
|
{
|
||||||
|
// TODO (freddy): Hard-coded until we upgrade the go-control-plane library
|
||||||
|
Name: "envoy.filters.listener.original_dst",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
filterChain, err := s.makeUpstreamFilterChainForDiscoveryChain(
|
filterChain, err := s.makeUpstreamFilterChainForDiscoveryChain(
|
||||||
"passthrough",
|
"passthrough",
|
||||||
OriginalDestinationClusterName,
|
OriginalDestinationClusterName,
|
||||||
|
|
|
@ -57,11 +57,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"listenerFilters": [
|
|
||||||
{
|
|
||||||
"name": "envoy.filters.listener.original_dst"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"trafficDirection": "OUTBOUND"
|
"trafficDirection": "OUTBOUND"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,11 +57,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"listenerFilters": [
|
|
||||||
{
|
|
||||||
"name": "envoy.filters.listener.original_dst"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"trafficDirection": "OUTBOUND"
|
"trafficDirection": "OUTBOUND"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue