|
|
|
@ -827,8 +827,7 @@ func (s *state) handleUpdateConnectProxy(u cache.UpdateEvent, snap *ConfigSnapsh
|
|
|
|
|
|
|
|
|
|
// Clean up data from services that were not in the update
|
|
|
|
|
for sn := range snap.ConnectProxy.WatchedUpstreams {
|
|
|
|
|
upstream := snap.ConnectProxy.UpstreamConfig[sn]
|
|
|
|
|
if upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
if upstream, ok := snap.ConnectProxy.UpstreamConfig[sn]; ok && upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
if _, ok := seenServices[sn]; !ok {
|
|
|
|
@ -836,8 +835,7 @@ func (s *state) handleUpdateConnectProxy(u cache.UpdateEvent, snap *ConfigSnapsh
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for sn := range snap.ConnectProxy.WatchedUpstreamEndpoints {
|
|
|
|
|
upstream := snap.ConnectProxy.UpstreamConfig[sn]
|
|
|
|
|
if upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
if upstream, ok := snap.ConnectProxy.UpstreamConfig[sn]; ok && upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
if _, ok := seenServices[sn]; !ok {
|
|
|
|
@ -845,8 +843,7 @@ func (s *state) handleUpdateConnectProxy(u cache.UpdateEvent, snap *ConfigSnapsh
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for sn := range snap.ConnectProxy.WatchedGateways {
|
|
|
|
|
upstream := snap.ConnectProxy.UpstreamConfig[sn]
|
|
|
|
|
if upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
if upstream, ok := snap.ConnectProxy.UpstreamConfig[sn]; ok && upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
if _, ok := seenServices[sn]; !ok {
|
|
|
|
@ -854,8 +851,7 @@ func (s *state) handleUpdateConnectProxy(u cache.UpdateEvent, snap *ConfigSnapsh
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for sn := range snap.ConnectProxy.WatchedGatewayEndpoints {
|
|
|
|
|
upstream := snap.ConnectProxy.UpstreamConfig[sn]
|
|
|
|
|
if upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
if upstream, ok := snap.ConnectProxy.UpstreamConfig[sn]; ok && upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
if _, ok := seenServices[sn]; !ok {
|
|
|
|
@ -863,8 +859,7 @@ func (s *state) handleUpdateConnectProxy(u cache.UpdateEvent, snap *ConfigSnapsh
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for sn, cancelFn := range snap.ConnectProxy.WatchedDiscoveryChains {
|
|
|
|
|
upstream := snap.ConnectProxy.UpstreamConfig[sn]
|
|
|
|
|
if upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
if upstream, ok := snap.ConnectProxy.UpstreamConfig[sn]; ok && upstream.Datacenter != "" && upstream.Datacenter != s.source.Datacenter {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
if _, ok := seenServices[sn]; !ok {
|
|
|
|
|