ipn/ipnlocal: add support to store certs in k8s secrets

Fixes #5676

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2023-02-01 06:25:48 -08:00
committed by Maisem Ali
parent 0e3fb91a39
commit 6bae55e351
2 changed files with 108 additions and 21 deletions

View File

@ -356,7 +356,11 @@ func tailscaledArgs(cfg *settings) []string {
args := []string{"--socket=" + cfg.Socket}
switch {
case cfg.InKubernetes && cfg.KubeSecret != "":
args = append(args, "--state=kube:"+cfg.KubeSecret, "--statedir=/tmp")
args = append(args, "--state=kube:"+cfg.KubeSecret)
if cfg.StateDir == "" {
cfg.StateDir = "/tmp"
}
fallthrough
case cfg.StateDir != "":
args = append(args, "--statedir="+cfg.StateDir)
default: