fix(agent): allow disabling Tailscale netns (#618)

This commit is contained in:
QEDeD
2026-08-25 07:04:15 +02:00
committed by GitHub
parent 9375e18b55
commit a5b6ecf28e
11 changed files with 157 additions and 7 deletions
+6
View File
@@ -11,6 +11,7 @@ import (
"github.com/tale/headplane/internal/config"
"github.com/tale/headplane/internal/tsnet"
"github.com/tale/headplane/internal/util"
"tailscale.com/net/netns"
)
type output struct {
@@ -41,6 +42,11 @@ func main() {
log.Info("TS_AUTHKEY provided (prefix: %s); connecting with pre-auth key", prefix)
}
if !cfg.TSNetNS {
log.Info("Tailscale network namespace handling disabled")
netns.SetEnabled(false)
}
agent := tsnet.NewAgent(cfg)
defer agent.Shutdown()