cloudflared-mirror/orchestration
Aleksei Sviridkin 793912756b
feat(tunnel): add configuration hot reload support
Add hot reload capability for locally-managed tunnels. When a config file
is specified (without --token), cloudflared now watches for changes and
automatically reloads the configuration.

Features:
- File watching via fsnotify with 500ms debounce
- Fallback polling every 30s for symlink rotation (Kubernetes ConfigMaps)
- Manual reload via SIGHUP signal
- Graceful handling of invalid configs (keeps current config)
- Thread-safe with TryLock to skip concurrent reloads

New files:
- orchestration/local_config.go: Config file reading and validation
- orchestration/local_watcher.go: File watcher with reload logic

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-01-14 20:54:59 +03:00
..
config.go TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00
config_test.go TUN-7776: Remove warp-routing flag from cloudflared 2023-09-18 10:02:56 +01:00
local_config.go feat(tunnel): add configuration hot reload support 2026-01-14 20:54:59 +03:00
local_config_test.go feat(tunnel): add configuration hot reload support 2026-01-14 20:54:59 +03:00
local_watcher.go feat(tunnel): add configuration hot reload support 2026-01-14 20:54:59 +03:00
local_watcher_test.go feat(tunnel): add configuration hot reload support 2026-01-14 20:54:59 +03:00
metrics.go TUN-5703: Add prometheus metric for current configuration version 2022-03-14 16:50:23 +00:00
orchestrator.go TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00
orchestrator_test.go TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00