mirror of
https://github.com/tale/headplane.git
synced 2026-08-29 16:37:10 +00:00
fix(agent): allow disabling Tailscale netns (#618)
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user