1
0
mirror of https://github.com/juanfont/headscale.git synced 2026-02-23 13:50:36 +01:00
juanfont.headscale/cmd/headscale/cli
Kristoffer Dalby 248d240186 node: implement disable key expiry via CLI and API
Add --disable flag to "headscale nodes expire" CLI command and
disable_expiry field handling in the gRPC API to allow disabling
key expiry for nodes. When disabled, the node's expiry is set to
NULL and IsExpired() returns false.

The CLI follows the new grpcRunE/RunE/printOutput patterns
introduced in the recent CLI refactor.

Also fix NodeSetExpiry to persist directly to the database instead
of going through persistNodeToDB which omits the expiry field.

Fixes #2681

Co-authored-by: Marco Santos <me@marcopsantos.com>
2026-02-20 10:58:49 +00:00
..
api_key.go cmd/headscale/cli: deduplicate expiration parsing and api-key flag validation 2026-02-20 11:42:07 +01:00
configtest.go cmd/headscale/cli: convert remaining commands to RunE 2026-02-20 11:42:07 +01:00
debug.go cmd/headscale/cli: move errMissingParameter and Error type to their users 2026-02-20 11:42:07 +01:00
dump_config.go cmd/headscale/cli: remove no-op Args functions from serveCmd and dumpConfigCmd 2026-02-20 11:42:07 +01:00
generate.go cmd/headscale/cli: convert remaining commands to RunE 2026-02-20 11:42:07 +01:00
health.go cmd/headscale/cli: switch to RunE with grpcRunE and error returns 2026-02-20 11:42:07 +01:00
mockoidc.go cmd/headscale/cli: move errMissingParameter and Error type to their users 2026-02-20 11:42:07 +01:00
nodes.go node: implement disable key expiry via CLI and API 2026-02-20 10:58:49 +00:00
policy.go cmd/headscale/cli: extract bypassDatabase helper and simplify policy file reads 2026-02-20 11:42:07 +01:00
preauthkeys.go cmd/headscale/cli: use HeadscaleDateTimeFormat and util.Base10 consistently 2026-02-20 11:42:07 +01:00
pterm_style.go cmd/headscale/cli: use HeadscaleDateTimeFormat and util.Base10 consistently 2026-02-20 11:42:07 +01:00
root_test.go cli: do not show new pre-releases on stable (#2813) 2025-10-24 13:15:53 +02:00
root.go cmd/headscale/cli: remove nil resp guards and unexport HasMachineOutputFlag 2026-02-20 11:42:07 +01:00
serve.go cmd/headscale/cli: remove no-op Args functions from serveCmd and dumpConfigCmd 2026-02-20 11:42:07 +01:00
users.go cmd/headscale/cli: move errMissingParameter and Error type to their users 2026-02-20 11:42:07 +01:00
utils.go cmd/headscale/cli: remove nil resp guards and unexport HasMachineOutputFlag 2026-02-20 11:42:07 +01:00
version.go cmd/headscale/cli: convert remaining commands to RunE 2026-02-20 11:42:07 +01:00