17 Commits

Author SHA1 Message Date
912943a343 test: add test on client redirect
This matches PR https://github.com/siderolabs/discovery-client/pull/4.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-09-15 17:37:55 +04:00
8db8ef361e feat: add an option to redirect all clients to a fixed endpoint
This allows to launch discovery service with a flag like
`--redirect-endpoint=example.com:443`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-09-08 21:27:47 +04:00
b34803b6e0 test: add a client test with affiliate deletion
Test affiliate deletion from PR
https://github.com/siderolabs/discovery-client/pull/3.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-25 21:35:16 +04:00
69ac844cf5 refactor: replace netaddr with netip/netipx
This removes deprecated inet.af/netaddr.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-25 21:11:45 +04:00
d5d0ff5a2f chore: rekres
Bump Go, rename package name to siderolabs, etc.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-08-25 20:29:58 +04:00
9baca2eb53 chore: bump prometheus/client_golang
Bump prometheus/client_golang and other deps

Fixes: [CVE-2022-21698](https://github.com/prometheus/client_golang/security/advisories/GHSA-cg3q-j54f-5p7p)

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-02-15 20:12:19 +05:30
a20b27d1b9 feat: rate limiting
enforce rate limits and a maximum burst size per IP address

Signed-off-by: Philipp Sauter <sauterp@protonmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-02-10 00:09:57 +03:00
52b44de1f7 feat: implement inspect page
Added a new handler and respective tests to get affiliate data in a cluster.
Signed-off-by: Rohit Dandamudi <rohit.dandamudi@siderolabs.com>
2021-11-23 19:00:46 +05:30
d85ea91d43 feat: extract peer address from nginx headers
- Added additional interceptors function to log the address
- Tests to cover the client IP address case
Signed-off-by: Rohit Dandamudi <rohit.dandamudi@siderolabs.com>
2021-11-17 18:31:58 +05:30
a0e6313af7 chore: relicense under BSL-1.1
Change date is 4 years from now, change license is MPL 2.0.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-10-28 23:13:26 +03:00
5960cd240d feat: improve version parsing
Do not store versions like `v0.14.0-alpha.0-7-gf7d9f211-dirty` to avoid
a combinatorial explosion in Prometheus.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-10-28 17:38:33 +00:00
d4a4ec2fac chore: move api and client out of the repository
The protobuf definitions were moved out to
https://github.com/talos-systems/discovery-api.

The client was moved out to
https://github.com/talos-systems/discovery-client.

No functional changes.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-10-13 21:41:25 +03:00
1655040813 chore: improve state logging
Log cluster creation and removal.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-10-01 15:41:19 +00:00
ab9c7c98dc chore: add Prometheus metrics
Closes #11.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-09-30 15:00:55 +03:00
509e9b2ced feat: implement client wrapper around discovery service API
Fixes #6

This wrapper handles protobuf marshaling, encryption, etc. on the client
data so that service doesn't have a way to see the data.

Client handles data refresh on TTL, updates, discovery of other
affiliates, etc.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-09-27 23:37:24 +03:00
619546696a feat: enable vtprotobuf, watch batching, more limits
Fixes #5

Batch watch responses in a single batch so that client can quickly know
that initial snapshot got delivered.

Bump go.mod deps.

Implement more limits.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-09-23 17:58:45 +03:00
7174ec1042 feat: implement new discovery service
This includes new in-memory core, new gRPC API, tests, etc.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-09-23 15:52:42 +03:00