Commit 5a5b1361 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Fix agent tunnel address on rke2

Fix issue where rke2 tunnel was trying to connect to apiserver port instead of supervisor Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent c8278053
......@@ -505,13 +505,14 @@ func (a *agentTunnel) getProxySyncer(ctx context.Context, wg *sync.WaitGroup, tl
return
}
newAddresses := sets.New(addresses...)
// Compare list of supervisor addresses before and after syncing apiserver
// endpoints into the proxy to figure out which supervisors we need to connect to
// or disconnect from. Note that the addresses we were passed will not match
// the supervisor addresses if the supervisor and apiserver are on different ports -
// they must be round-tripped through proxy.Update before comparing.
curAddresses := sets.New(proxy.SupervisorAddresses()...)
if newAddresses.Equal(curAddresses) {
return
}
proxy.Update(addresses)
newAddresses := sets.New(proxy.SupervisorAddresses()...)
// add new servers
for address := range newAddresses.Difference(curAddresses) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment