cmd/containerboot: don't write device ID when not in Kubernetes.

Fixes #6218.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/6223/head
David Anderson 2 years ago committed by Dave Anderson
parent e0669555dd
commit bf2d3cd074

@ -133,7 +133,7 @@ func main() {
log.Fatalf("installing proxy rules: %v", err) log.Fatalf("installing proxy rules: %v", err)
} }
} }
if cfg.KubeSecret != "" { if cfg.InKubernetes && cfg.KubeSecret != "" {
if err := storeDeviceID(ctx, cfg.KubeSecret, string(st.Self.ID)); err != nil { if err := storeDeviceID(ctx, cfg.KubeSecret, string(st.Self.ID)); err != nil {
log.Fatalf("storing device ID in kube secret: %v", err) log.Fatalf("storing device ID in kube secret: %v", err)
} }

Loading…
Cancel
Save