Commit graph

1 commit

Author SHA1 Message Date
Andrew Lytvynov 74cbd1379c
Split remote cluster watching from reversetunnel.AgentPool (#4290)
* Split remote cluster watching from reversetunnel.AgentPool

Separating the responsibilities:
- AgentPool takes a proxy (or LB) endpoint and manages a pool of agents
  for it (each agent is a tunnel to a unique proxy process behind the
  endpoint)
- RemoteClusterTunnelManager polls the auth server for a list of trusted
  clusters and manages a set of AgentPools, one for each trusted cluster

Previously, AgentPool did both of the above.

Also, bundling some cleanup in the area:
- better error when dialing through tunnel and directly both fail
- rename RemoteKubeProxy to LocalKubernetes to better reflect the
  meaning
- remove some dead code and simplify config structs

* reversetunnel: factor out track.Key

ClusterName is the same for all Agents in an AgentPool. track.Tracker
needs to only track proxy addresses.
2020-09-17 15:07:44 +00:00