tailscale/cmd/containerboot
Tom Meadows c25843e176
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
natlab-integrationtest / natlab-integrationtest (push) Has been cancelled
CI / gomod-cache (push) Has been cancelled
CI / fuzz (push) Has been cancelled
tailscale.com/cmd/vet / vet (push) Has been cancelled
CI / race-root-integration (1/4) (push) Has been cancelled
CI / race-root-integration (2/4) (push) Has been cancelled
CI / race-root-integration (3/4) (push) Has been cancelled
CI / race-root-integration (4/4) (push) Has been cancelled
CI / test (-race, amd64, 1/3) (push) Has been cancelled
CI / test (-race, amd64, 2/3) (push) Has been cancelled
CI / test (-race, amd64, 3/3) (push) Has been cancelled
CI / test (386) (push) Has been cancelled
CI / test (amd64) (push) Has been cancelled
CI / Windows (${{ matrix.name || matrix.shard}}) (win-bench, benchmarks) (push) Has been cancelled
CI / Windows (${{ matrix.name || matrix.shard}}) (win-shard-1-2, 1/2) (push) Has been cancelled
CI / Windows (${{ matrix.name || matrix.shard}}) (win-shard-2-2, 2/2) (push) Has been cancelled
CI / macos (push) Has been cancelled
CI / privileged (push) Has been cancelled
CI / vm (push) Has been cancelled
CI / cross (386, linux) (push) Has been cancelled
CI / cross (amd64, darwin) (push) Has been cancelled
CI / cross (amd64, freebsd) (push) Has been cancelled
CI / cross (amd64, openbsd) (push) Has been cancelled
CI / cross (amd64, windows) (push) Has been cancelled
CI / cross (arm, 5, linux) (push) Has been cancelled
CI / cross (arm, 7, linux) (push) Has been cancelled
CI / cross (arm64, darwin) (push) Has been cancelled
CI / cross (arm64, linux) (push) Has been cancelled
CI / cross (arm64, windows) (push) Has been cancelled
CI / cross (loong64, linux) (push) Has been cancelled
CI / ios (push) Has been cancelled
CI / crossmin (amd64, illumos) (push) Has been cancelled
CI / crossmin (amd64, plan9) (push) Has been cancelled
CI / crossmin (amd64, solaris) (push) Has been cancelled
CI / crossmin (ppc64, aix) (push) Has been cancelled
CI / android (push) Has been cancelled
CI / wasm (push) Has been cancelled
CI / tailscale_go (push) Has been cancelled
CI / depaware (push) Has been cancelled
CI / go_generate (push) Has been cancelled
CI / make_tidy (push) Has been cancelled
CI / licenses (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=darwin, arm64, darwin, macOS) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=linux, amd64, linux, Linux) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=windows, amd64, windows, Windows) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=1/4, amd64, linux, Portable (1/4)) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=2/4, amd64, linux, Portable (2/4)) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=3/4, amd64, linux, Portable (3/4)) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=4/4, amd64, linux, Portable (4/4)) (push) Has been cancelled
CI / notify_slack (push) Has been cancelled
CI / merge_blocker (push) Has been cancelled
CI / check_mergeability_strict (push) Has been cancelled
CI / check_mergeability (push) Has been cancelled
cmd/{containerboot,k8s-operator}: reissue auth keys for broken proxies (#16450) (#18962)
Adds logic for containerboot to signal that it can't auth, so the
operator can reissue a new auth key. This only applies when running with
a config file and with a kube state store.

If the operator sees reissue_authkey in a state Secret, it will create a
new auth key iff the config has no auth key or its auth key matches the
value of reissue_authkey from the state Secret. This is to ensure we
don't reissue auth keys in a tight loop if the proxy is slow to start or
failing for some other reason. The reissue logic also uses a burstable
rate limiter to ensure there's no way a terminally misconfigured
or buggy operator can automatically generate new auth keys in a tight loop.

Additional implementation details (ChaosInTheCRD):

- Added `ipn.NotifyInitialHealthState` to ipn watcher, to ensure that
  `n.Health` is populated when notify's are returned.
- on auth failure, containerboot:
  - Disconnects from control server
  - Sets reissue_authkey marker in state Secret with the failing key
  - Polls config file for new auth key (10 minute timeout)
  - Restarts after receiving new key to apply it

- modified operator's reissue logic slightly:
  - Deletes old device from tailnet before creating new key
  - Rate limiting: 1 key per 30s with initial burst equal to replica count
  - In-flight tracking (authKeyReissuing map) prevents duplicate API calls
    across reconcile loops

Updates #14080

Change-Id: I6982f8e741932a6891f2f48a2936f7f6a455317f

(cherry picked from commit 969927c47c3d4de05e90f5b26a6d8d931c5ceed4)



(cherry picked from commit 95a135ead1)

Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2026-03-11 12:50:02 +00:00
..
egressservices_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
egressservices.go cmd/containerboot: fix error handling for egress (#18657) 2026-02-10 10:19:06 +00:00
forwarding.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ingressservices_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ingressservices.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
kube_test.go cmd/{containerboot,k8s-operator}: reissue auth keys for broken proxies (#16450) (#18962) 2026-03-11 12:50:02 +00:00
kube.go cmd/{containerboot,k8s-operator}: reissue auth keys for broken proxies (#16450) (#18962) 2026-03-11 12:50:02 +00:00
main_test.go cmd/{containerboot,k8s-operator}: reissue auth keys for broken proxies (#16450) (#18962) 2026-03-11 12:50:02 +00:00
main.go cmd/{containerboot,k8s-operator}: reissue auth keys for broken proxies (#16450) (#18962) 2026-03-11 12:50:02 +00:00
serve_test.go cmd/containerboot,kube: enable autoadvertisement of Tailscale services on containerboot (#18527) 2026-02-20 15:52:34 -08:00
serve.go cmd/containerboot,kube: enable autoadvertisement of Tailscale services on containerboot (#18527) 2026-02-20 15:52:34 -08:00
settings_test.go cmd/containerboot: handle v6 pod ips that are missing square brackets (#18519) 2026-02-03 11:16:59 +00:00
settings.go cmd/containerboot,kube: enable autoadvertisement of Tailscale services on containerboot (#18527) 2026-02-20 15:52:34 -08:00
tailscaled.go cmd/containerboot,kube: enable autoadvertisement of Tailscale services on containerboot (#18527) 2026-02-20 15:52:34 -08:00
test_tailscale.sh cmd/containerboot: make a tests table, add more tests. 2022-11-10 09:14:27 -08:00
test_tailscaled.sh cmd/containerboot: avoid leaking bash scripts after test runs 2023-09-21 13:17:48 -07:00