Description
The existing workspacesdk
API allows connecting to a single workspace Agent. We need to add a new API call that creates a tailnet connected to every started agent in workspaces owned by the user.
To do this, we
- Use the new HTTP endpoint and WorkspaceUpdates RPC to track all the workspaces and agents (Add new WorkspaceUpdates tailnet RPC #14716)
- Program the agents into the tailnet using the enhanced support for multiple peers (enhance tailnetAPIConnector to support multiple peers #14729)
- Program DNS records for the peers (Enhance tailnet to (optionally) configure DNS records for peers. #14718)
DNS naming scheme:
- <agent>.<workspace>.<user>.coder
- <agent>.<workspace>.me.coder - works with
me
as an alias for the logged in user
- <agent>.<workspace>.me.coder - works with
- <workspace>.coder - alias that assumes
me
and that the workspace has only one agent.