mirror of
https://github.com/status-im/consul.git
synced 2025-01-15 08:14:54 +00:00
proxycfg: use external addresses in tproxy when crossing partition boundaries (#11823)
This commit is contained in:
parent
85fe875d07
commit
4aabbe529c
@ -108,8 +108,10 @@ func (s *handlerUpstreams) handleUpdateUpstreams(ctx context.Context, u cache.Up
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(partitions) Update to account for upstream in remote partition once tproxy supports it
|
// Make sure to use an external address when crossing partitions.
|
||||||
addr, _ := node.BestAddress(false)
|
isRemote := !structs.EqualPartitions(svc.PartitionOrDefault(), s.proxyID.PartitionOrDefault())
|
||||||
|
addr, _ := node.BestAddress(isRemote)
|
||||||
|
|
||||||
upstreamsSnapshot.PassthroughUpstreams[svc.String()].Addrs[addr] = struct{}{}
|
upstreamsSnapshot.PassthroughUpstreams[svc.String()].Addrs[addr] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user