Commit Graph

84 Commits

Author SHA1 Message Date
Kristoffer Dalby
26718e8308 Revert gorm upgrade 2021-11-06 20:23:04 +00:00
Kristoffer Dalby
319237910b Resolve new dependencies 2021-11-04 22:28:35 +00:00
Kristoffer Dalby
cbf3f5d640 Resolve merge conflict 2021-10-30 15:33:01 +00:00
Kristoffer Dalby
a9da7c8fd9 Update go.mod 2021-10-26 20:41:35 +00:00
Kristoffer Dalby
2997f4d251
Merge branch 'main' into main 2021-10-08 22:21:41 +01:00
Kristoffer Dalby
f0c54490ed Allow multiple namespaces to be checked for state at the same time 2021-10-06 22:06:07 +00:00
Raal Goff
c487591437 use go-oidc instead of verifying and extracting tokens ourselves, rename oidc_endpoint to oidc_issuer to be more inline with spec 2021-10-06 17:19:15 +08:00
Kristoffer Dalby
1d5b090579 Initial work on Prometheus metrics
This commit adds some Prometheus metrics to /metrics in headscale.

It will add the standard go metrics, some automatic gin metrics and some
initial headscale specific ones.

Some of them has been added to aid debugging #97 (loop bug)

In the future, we can use the metrics to get rid of the sleep in the
integration tests by checking that our expected number of nodes has been
registered:

```
headscale_machine_registrations_total
```
2021-10-04 16:28:07 +00:00
Kristoffer Dalby
0393ab524c
Merge branch 'main' into main 2021-09-28 11:20:31 +01:00
Juan Font Alonso
2048e9e136 Added version checker on startup 2021-09-27 16:26:18 +02:00
Raal Goff
e7a2501fe8 initial work on OIDC (SSO) integration 2021-09-26 16:53:05 +08:00
Juan Font
5840f88251 Update tailscale dependencies to v1.14 2021-09-14 23:46:16 +02:00
Juan Font
2c2968473a Update basic dependencies 2021-09-14 23:42:19 +02:00
Juan Font
47b61c0cea
Merge pull request #86 from juanfont/better-ui
Improve tables in CLI
2021-08-16 09:33:47 +02:00
Juan Font
36f5f78f46 pterm dependency 2021-08-15 23:10:50 +02:00
Kristoffer Dalby
9698abbfd5
Resolve merge conflict 2021-08-13 10:33:19 +01:00
Kristoffer Dalby
4e077b053c Initial work, add integration tests
This commit adds integration tests to headscale. They are currently
quite simple, but it lays the groundwork for more comprehensive testing
and ensuring we dont break things with the official tailscale client.

The test works by leveraging Docker (via dockertest) to spin up a
Headscale container, and a number of tailscale containers (10).

Each tailscale container is joined to the headscale and then "passed on"
to the tests.

Currently three tests have been implemented:

- Have all tailscale containers join headscale (in the setup process)
- Get IP from each container (I plan to extend this with cross-ping)
- List nodes with headscales CLI and verify all has been registered

This test depends on Docker, and currently, I have not looked into
hooking it into Github Actions.
2021-08-08 17:50:32 +01:00
Kristoffer Dalby
73a00c89ff Try to detect color support, make color configurable
This commit tries to detect if users can render colors in their terminal
and only enables color logs if that is true.

It also adds no-color.org's NO_COLOR env var support to allow it to be
disabled.
2021-08-06 07:29:57 +01:00
Kristoffer Dalby
ee704f8ef3
Initial port to zerologger 2021-08-05 18:11:26 +01:00
Juan Font Alonso
0f649aae8b Ask for confirmation before deleting 2021-07-17 11:09:42 +02:00
Juan Font
d446e8a2fb More stuff in go.sum 2021-07-04 13:24:27 +02:00
Juan Font Alonso
736182f651 Update dependencies, including Tailscale 1.10.x 2021-06-25 18:56:49 +02:00
Juan Font Alonso
d67be9ef58 go.mod updates 2021-06-24 15:49:27 +02:00
Juan Font Alonso
ad4a61cc7b update in sum 2021-05-15 00:08:22 +02:00
Ward Vandewege
be83281f58 Fix build breakage due to https://github.com/golang/go/issues/44129.
The issue was that our build pipeline uses 'go get' call to install
golint, which changed the go.mod/go.sum files (not good, but I hadn't
noticed before). Due to Golang bug #44129, this caused breakage on the
dependencies of certain modules we use.

The fix was to switch to 'go install golang.org/x/lint/golint@latest'.
The addition of '@latest' puts 'go install' in module aware mode, which
no longer changes go.mod file in the current directory. This is better,
and it also avoids bug #44129.

This commit also has a change due to `go mod tidy`. Finally, I had to
add a longer timeout for the golangci-lint installation step in the
github actions workflow, since that seems to take a bit over a minute
now.  This step is usually cached on subsequent runs, so we hadn't seen
that failure before.
2021-05-12 09:06:46 -04:00
Ward Vandewege
b34e90c45d Fix bug in preauthkeys: namespace object was not populated in the return
value from CreatePreAuthKey and GetPreAuthKeys. Add tests for that bug,
and the rest of the preauthkeys functionality.

Fix path in `compress` Makefile target.
2021-05-02 14:58:05 -04:00
Ward Vandewege
f7c7b4873a Address a bunch of golangci-lint warnings. 2021-04-24 11:41:29 -04:00
Juan Font Alonso
9c40e829ec Create preauthkeys kinda working (not usable yet) 2021-04-23 00:40:42 +02:00
Juan Font Alonso
c284f3eefa Bump mod 2021-04-08 23:57:47 +02:00
Juan Font Alonso
db75cd39a7 Update in preparation of supporting exit nodes 2021-03-10 22:33:37 +01:00
Juan Font Alonso
b1d06f3ffd headscale now has a CLI - registration of machines occurs there 2021-02-21 01:30:03 +01:00
Juan Font Alonso
c5fbc5baa8 Bumped dependencies 2021-02-20 22:43:07 +01:00
Juan Font Alonso
1ddb4febe8 Embedding frontend via Pkger 2020-07-04 13:38:58 +02:00
Juan Font Alonso
7198c8bd77 Initial commit 2020-06-21 12:32:08 +02:00