fix: guard D601 k3s control plane

This commit is contained in:
Codex
2026-05-23 12:57:23 +00:00
parent a20d041c23
commit 6c44f66289
9 changed files with 47 additions and 8 deletions
+7 -2
View File
@@ -216,9 +216,14 @@ function validateDatabaseUrl(url: string): { ok: boolean; url: string; reason: s
}
function kubectlDryRun(manifestPath: string): unknown {
const result = runCommand(["kubectl", "apply", "--dry-run=client", "--validate=false", "-f", manifestPath], repoRoot, { timeoutMs: 60_000 });
const kubeconfig = "/etc/rancher/k3s/k3s.yaml";
const result = runCommand(["kubectl", "apply", "--dry-run=client", "--validate=false", "-f", manifestPath], repoRoot, {
timeoutMs: 60_000,
env: { ...process.env, KUBECONFIG: kubeconfig },
});
return {
command: result.command,
command: [`KUBECONFIG=${kubeconfig}`, ...result.command],
kubeconfig,
exitCode: result.exitCode,
signal: result.signal,
timedOut: result.timedOut,