In some configurations, user explicitly do not want to store
tailscale state in k8s secrets, because doing that leads to
some annoying permission issues with sidecar containers.
With this change, TS_KUBE_SECRET="" and TS_STATE_DIR=/foo
will force storage to file when running in kubernetes.
Fixes#6704.
Signed-off-by: David Anderson <danderson@tailscale.com>
(cherry picked from commit af3127711a6df3a920204623bb24e1d74df97f1b)
In preparation for making startup more complex with IPN bus watches.
Signed-off-by: David Anderson <danderson@tailscale.com>
(cherry picked from commit e79a1eb24a0d829dc280df1bc9e97be84a8d6043)
It's supposed to set `--statedir` rather than `--state` file.
Fixes#6634.
Signed-off-by: Anton Tolchanov <anton@tailscale.com>
(cherry picked from commit 5ff946a9e694c546427388205dd1fab92422f10f)