Kristoffer Dalby
ce3f79a3bf
Add yaml to output help
2021-11-07 08:58:45 +00:00
Kristoffer Dalby
a249d3fe39
Fix color for current namespace in nodes command
2021-11-07 08:58:03 +00:00
Kristoffer Dalby
8df41b069f
Formatting
2021-11-04 22:45:08 +00:00
Kristoffer Dalby
be4256b1d0
Convert routes command to use gRPC
2021-11-04 22:44:59 +00:00
Kristoffer Dalby
77a973878c
Convert preauthkeys command to use gRPC
2021-11-04 22:44:49 +00:00
Kristoffer Dalby
7b0d2dfb4a
Convert nodes command to use gRPC
2021-11-04 22:44:35 +00:00
Kristoffer Dalby
79871d2463
Make namespace command use gRPC
...
This commit is a first in a series of commits migrating the command
interfaces to use the new gRPC client.
As a part of this commit, they have been streamlined and each command
_should_ be a bit more similar and use consistent output.
By using the new output function, we now make sure its always json
(errors and everything) if the user asks for JSON.
2021-11-04 22:42:21 +00:00
Kristoffer Dalby
dce82f4323
Use new json wrapper for version command
2021-11-04 22:41:55 +00:00
Kristoffer Dalby
cd34a5d6f3
Expand json output to support yaml, make more generic
2021-11-04 22:31:47 +00:00
Kristoffer Dalby
4226da3d6b
Add "debug" command
...
This commit adds a debug command tree, intended to host commands used
for debugging and testing.
It adds a create node/machine command which will be used later to create
machines that can be used to test the registration command.
2021-11-04 22:08:45 +00:00
Kristoffer Dalby
12f2a7cee0
Move context per cure's suggestion
2021-10-31 16:26:51 +00:00
Kristoffer Dalby
264e5964f6
Resolve merge conflict
2021-10-31 09:40:43 +00:00
Kristoffer Dalby
cbf3f5d640
Resolve merge conflict
2021-10-30 15:33:01 +00:00
Kristoffer Dalby
018e42acad
Merge branch 'main' into initial-api-cli-work
2021-10-30 15:31:34 +01:00
Kristoffer Dalby
434fac52b7
Fix lint error
2021-10-30 14:29:03 +00:00
Kristoffer Dalby
6aacada852
Switch from gRPC localhost to socket
...
This commit changes the way CLI and grpc-gateway communicates with the
gRPC backend to socket, instead of localhost. Unauthenticated access now
goes on the socket, while the network interface will require API key (in
the future).
2021-10-30 14:08:16 +00:00
Kristoffer Dalby
72fd2a2780
Fix lint error
2021-10-29 17:36:11 +00:00
Kristoffer Dalby
9ef031f0f8
Port create, delete and list of namespace to grpc
2021-10-29 17:16:54 +00:00
Kristoffer Dalby
81b8610dff
Add helper function to setup grpc client for cli
2021-10-29 17:15:52 +00:00
Kristoffer Dalby
eefd82a574
Move config loading out of the headscale app setup
2021-10-29 17:09:06 +00:00
Kristoffer Dalby
002b5c1dad
Add grpc token auth struct
2021-10-29 17:08:21 +00:00
Raal Goff
2d252da221
suggested documentation and comments
2021-10-29 21:35:07 +08:00
Ward Vandewege
f9187bdfc4
Switch to named arguments for all nodes
subcommands. Update docs
...
accordingly. Fix integration test failure.
2021-10-28 09:31:15 -04:00
Ward Vandewege
b00a2729e3
Update cmd/headscale/cli/nodes.go
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
2021-10-28 08:39:42 -04:00
Ward Vandewege
6c01b86e4c
Update cmd/headscale/cli/nodes.go
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
2021-10-28 08:39:27 -04:00
Ward Vandewege
d086cf4691
Move the namespace argument back to a flag for the share and unshare
...
commands.
2021-10-27 17:51:42 -04:00
Ward Vandewege
f9ece0087d
Make the cli help a little more explicit for the nodes subcommand.
2021-10-26 08:50:25 -04:00
Ward Vandewege
dd7557850e
cli changes for the nodes
subcommand:
...
* when listing nodes, a namespace is now optional, when it is not
provided, all nodes are shown
* when deleting, and sharing a node, remove the `namespace` flag, it was
superfluous and unused
* when unsharing a node, specify the namespace as an argument not a
flag, making the UX the same as for sharing.
Also refactor the share/unshare code to reuse the shared bits.
2021-10-24 17:50:28 -04:00
Kristoffer Dalby
57f46ded83
Split derp into its own config struct
2021-10-22 16:55:14 +00:00
Juan Font
41c5a0ddf5
Apply suggestions from code review
...
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
2021-10-20 09:35:56 +02:00
Juan Font Alonso
18b00b5d8d
Add support for Split DNS (implements #179 )
2021-10-19 20:51:43 +02:00
Kristoffer Dalby
da14750396
Merge branch 'main' into main
2021-10-19 15:26:18 +01:00
Kristoffer Dalby
677bd9b657
Implement namespace matching
2021-10-18 19:27:52 +00:00
Ward Vandewege
9e3339b4f1
Add cli support for unsharing a node from a namespace.
2021-10-17 16:29:46 -04:00
Kristoffer Dalby
710616f118
Merge branch 'main' into main
2021-10-17 13:26:37 +01:00
Ward Vandewege
7dcf4a5147
Add support for renaming namespaces.
2021-10-16 11:20:06 -04:00
Raal Goff
d0cd5af419
fix incorrect merge
2021-10-16 22:34:11 +08:00
unreality
afbfc1d370
Merge branch 'main' into main
2021-10-16 22:31:37 +08:00
Juan Font Alonso
be3a379d10
Added --force flag on node delete ( fixes #164 )
2021-10-16 12:30:52 +02:00
Juan Font
654d2b9910
Merge branch 'main' into complete-expire-command
2021-10-16 09:41:14 +02:00
Juan Font Alonso
0d13e16fed
Improve help message to expire key ( fixes #161 )
2021-10-14 23:58:15 +02:00
Juan Font Alonso
91d135e069
Show JSON when error on expire key ( fixes #162 )
2021-10-14 23:54:07 +02:00
Juan Font
cc3e8705bd
Merge branch 'main' into better-pak-management
2021-10-13 23:04:00 +02:00
Juan Font
06ae2a6c50
Merge branch 'main' into better-pak-management
2021-10-13 23:00:38 +02:00
Juan Font
93517aa6f8
Apply suggestions from code review
...
Renamed AlreadyUsed to Used
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
2021-10-13 22:51:55 +02:00
Juan Font
5f0f3705c0
Merge branch 'main' into disable-version-check-on-json
2021-10-13 22:44:18 +02:00
Juan Font Alonso
30788e1a70
Add AlreadyUsed field to Auth Keys ( fixes #157 and #158 )
2021-10-13 18:13:26 +02:00
Juan Font Alonso
27947c6746
This commit disables the version checker when JSON output ( #153 )
2021-10-13 00:18:55 +02:00
Juan Font Alonso
6924b7bf4c
Output json when deleting node ( fixes #152 )
2021-10-12 23:48:08 +02:00
Raal Goff
74e6c1479e
updates from code review
2021-10-10 17:22:42 +08:00