Skip to content

Add Tailnet API v2 websocket for CLI clients #10532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spikecurtis opened this issue Nov 6, 2023 · 0 comments · Fixed by #11228
Closed

Add Tailnet API v2 websocket for CLI clients #10532

spikecurtis opened this issue Nov 6, 2023 · 0 comments · Fixed by #11228
Assignees
Labels
networking Area: networking

Comments

@spikecurtis
Copy link
Contributor

After the Tailnet v2 API is supported in PG Coordinator (#10528) and AGPL (#10529), add a websocket to allow CLI clients to connect.

@cdr-bot cdr-bot bot added the feature label Nov 6, 2023
@spikecurtis spikecurtis added the networking Area: networking label Nov 6, 2023
@spikecurtis spikecurtis self-assigned this Dec 14, 2023
spikecurtis added a commit that referenced this issue Dec 15, 2023
Renames the tailnet.Coordinator to represent both v1 and v2 APIs, so that we can use this interface for the main atomic pointer.

Part of #10532
spikecurtis added a commit that referenced this issue Dec 15, 2023
Part of #10532

Adds a method to validate a requested version of the tailnet API
spikecurtis added a commit that referenced this issue Dec 15, 2023
Part of #10532

DRPC transport over yamux and in-mem pipes was previously only used on the provisioner APIs, but now will also be used in tailnet.  Moved to subpackage of codersdk to avoid import loops.
spikecurtis added a commit that referenced this issue Dec 15, 2023
Part of #10532

Adds a tailnet ClientService that accepts a net.Conn and serves v1 or v2 of the tailnet API.

Also adds a DRPCService that implements the DRPC interface for the v2 API.  This component is within the ClientService, but needs to be reusable and exported so that we can also embed it in the Agent API.

Finally, includes a NewDRPCClient function that takes a net.Conn and runs dRPC in yamux over it on the client side.
spikecurtis added a commit that referenced this issue Dec 15, 2023
closes #10532

Adds v2 support to the /coordinate endpoint via a query parameter.

v1 already has test cases, and we haven't implemented v2 at the client yet, so the only new test case is an unsupported version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
networking Area: networking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant