Upstreams loop is only for prepared queries and they are not CentrallyConfigured
This commit is contained in:
parent
9256d09255
commit
4c58711594
|
@ -242,9 +242,9 @@ func (s *Server) listenersFromSnapshotConnectProxy(cInfo connectionInfo, cfgSnap
|
||||||
resources = append(resources, outboundListener)
|
resources = append(resources, outboundListener)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Looping over explicit upstreams is only needed for prepared queries because they do not have discovery chains
|
||||||
for id, u := range cfgSnap.ConnectProxy.UpstreamConfig {
|
for id, u := range cfgSnap.ConnectProxy.UpstreamConfig {
|
||||||
if _, ok := cfgSnap.ConnectProxy.DiscoveryChain[id]; ok && u.DestinationType != structs.UpstreamDestTypePreparedQuery {
|
if u.DestinationType != structs.UpstreamDestTypePreparedQuery {
|
||||||
// This upstream is already covered above
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,10 +258,7 @@ func (s *Server) listenersFromSnapshotConnectProxy(cInfo connectionInfo, cfgSnap
|
||||||
if u.LocalBindAddress != "" {
|
if u.LocalBindAddress != "" {
|
||||||
address = u.LocalBindAddress
|
address = u.LocalBindAddress
|
||||||
}
|
}
|
||||||
// This is the case where upstream config is centralized but no port was specified
|
|
||||||
if u.LocalBindPort == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
upstreamListener := makeListener(id, address, u.LocalBindPort, envoy_core_v3.TrafficDirection_OUTBOUND)
|
upstreamListener := makeListener(id, address, u.LocalBindPort, envoy_core_v3.TrafficDirection_OUTBOUND)
|
||||||
|
|
||||||
filterChain, err := s.makeUpstreamFilterChainForDiscoveryChain(
|
filterChain, err := s.makeUpstreamFilterChainForDiscoveryChain(
|
||||||
|
|
Loading…
Reference in New Issue