diff --git a/scripts/src/hwlab-node-web-sentinel-cicd.ts b/scripts/src/hwlab-node-web-sentinel-cicd.ts index 7cd6927f..04d8e0c9 100644 --- a/scripts/src/hwlab-node-web-sentinel-cicd.ts +++ b/scripts/src/hwlab-node-web-sentinel-cicd.ts @@ -936,11 +936,14 @@ function applySentinelArgoApplication(state: SentinelCicdState, timeoutSeconds: const app = state.manifests.find((item) => item.kind === "Application"); if (app === undefined) return { ok: false, reason: "application-manifest-missing", valuesRedacted: true }; const yaml = `${Bun.YAML.stringify(app).trim()}\n`; + const namespace = stringAt(state.cicd, "argo.namespace"); + const applicationName = stringAt(state.cicd, "argo.applicationName"); const script = [ "set -eu", "tmp=$(mktemp)", `cat >"$tmp" <<'YAML'\n${yaml}YAML`, "kubectl apply -f \"$tmp\"", + `kubectl -n ${shellQuote(namespace)} annotate application ${shellQuote(applicationName)} argocd.argoproj.io/refresh=hard --overwrite`, ].join("\n"); const result = runCommand(["trans", stringAt(state.controlPlaneNode, "kubeRoute"), "sh", "--", script], repoRoot, { timeoutMs: Math.min(timeoutSeconds, 60) * 1000 }); return { ok: result.exitCode === 0, result: compactCommand(result), valuesRedacted: true };