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:
@@ -202,6 +202,7 @@ const agentConfig = type({
|
||||
cache_ttl: "number.integer = 180000",
|
||||
executable_path: 'string = "/usr/libexec/headplane/agent"',
|
||||
work_dir: 'string = "/var/lib/headplane/agent"',
|
||||
tailscale_netns: "boolean = true",
|
||||
pre_authkey: type("unknown").narrow(deprecatedField()).optional(),
|
||||
cache_path: type("unknown").narrow(deprecatedField()).optional(),
|
||||
});
|
||||
@@ -212,6 +213,7 @@ const partialAgentConfig = type({
|
||||
cache_ttl: "number.integer?",
|
||||
executable_path: "string?",
|
||||
work_dir: "string?",
|
||||
tailscale_netns: "boolean?",
|
||||
pre_authkey: type("unknown").narrow(deprecatedField()).optional(),
|
||||
cache_path: type("unknown").narrow(deprecatedField()).optional(),
|
||||
});
|
||||
|
||||
@@ -94,6 +94,7 @@ export async function createAgentManager(
|
||||
const cacheTtl = agentConfig.cache_ttl ?? 180_000;
|
||||
const executablePath = agentConfig.executable_path;
|
||||
const workDir = agentConfig.work_dir;
|
||||
const tailscaleNetNS = agentConfig.tailscale_netns;
|
||||
|
||||
const state: SyncState = {
|
||||
syncedAt: null,
|
||||
@@ -125,6 +126,7 @@ export async function createAgentManager(
|
||||
HEADPLANE_AGENT_TS_SERVER: headscaleUrl,
|
||||
HEADPLANE_AGENT_HOSTNAME: hostName,
|
||||
HEADPLANE_AGENT_DEBUG: log.debugEnabled ? "true" : "false",
|
||||
HEADPLANE_AGENT_TS_NETNS: tailscaleNetNS ? "true" : "false",
|
||||
};
|
||||
|
||||
if (authKey) {
|
||||
|
||||
Reference in New Issue
Block a user