mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-06 01:23:10 -05:00
This commit removes the owner reference from ProxyGroup state Secrets, also from Secrets that an older operator created. On a Foreground delete, the garbage collector deleted these Secrets before the finalizers ran. The finalizers read them to find devices, so cleanup failed and devices stayed in the tailnet. The ProxyGroup cleanup now deletes the Secrets after the devices, and the reconciler watches them by label. The kube-apiserver cleanup finds its cert resources by label, so it does not need the state Secrets. A new e2e test covers Foreground deletes. Fixes #22072 Signed-off-by: David Bond <davidsbond93@gmail.com>