fix: apply hwlab follower pipeline via k8s api

This commit is contained in:
Codex
2026-07-03 14:26:59 +00:00
parent f3fccb8f35
commit 1f1c76941d
2 changed files with 60 additions and 6 deletions
+3 -1
View File
@@ -14,7 +14,7 @@ export function runNativeHwlabControlPlaneRefresh(
jobName: string,
): { jobName: string; namespace: string; result: NativeK8sJobResult } {
const namespace = registry.controller.namespace;
const result = runNativeK8sJob(namespace, jobName, nativeHwlabControlPlaneRefreshJobManifest(registry, follower, spec, observedSha, jobName), timeoutSeconds, "control-plane-refresh", registry.controller.budgets);
const result = runNativeK8sJob(namespace, jobName, nativeHwlabControlPlaneRefreshJobManifest(registry, follower, spec, observedSha, jobName, timeoutSeconds), timeoutSeconds, "control-plane-refresh", registry.controller.budgets);
return { jobName, namespace, result };
}
@@ -24,6 +24,7 @@ function nativeHwlabControlPlaneRefreshJobManifest(
spec: HwlabRuntimeLaneSpec,
observedSha: string,
jobName: string,
timeoutSeconds: number,
): Record<string, unknown> {
const mirror = nodeRuntimeGitMirrorTarget(spec);
const overlay = Buffer.from(JSON.stringify(nodeRuntimeRenderOverlay(spec)), "utf8").toString("base64");
@@ -81,6 +82,7 @@ function nativeHwlabControlPlaneRefreshJobManifest(
{ name: "GIT_READ_URL", value: spec.gitReadUrl },
{ name: "FIELD_MANAGER", value: spec.controlPlaneFieldManager },
{ name: "TEKTON_NAMESPACE", value: tektonNamespace },
{ name: "KUBE_REQUEST_TIMEOUT_SECONDS", value: String(timeoutSeconds) },
{ name: "HWLAB_RENDER_OVERLAY_B64", value: overlay },
],
}],