feat: wire device pod gateway dispatch

This commit is contained in:
Codex
2026-05-29 10:44:59 +08:00
parent dfc1b42fe3
commit 4cdc80e672
12 changed files with 543 additions and 18 deletions
+4
View File
@@ -82,6 +82,10 @@ test("v02 render follows TypeScript runtime checks and does not self-patch boots
assert.match(workloads, /"name": "HWLAB_ACCESS_CONTROL_REQUIRED"[\s\S]{0,80}"value": "1"/u);
assert.match(workloads, /"name": "HWLAB_BOOTSTRAP_ADMIN_PASSWORD_HASH"/u);
assert.match(workloads, /"name": "hwlab-v02-bootstrap-admin"/u);
const devicePod = workloadsJson.items.find((item) => item.metadata?.name === "hwlab-device-pod");
assert.ok(devicePod, "expected v02 hwlab-device-pod workload");
const devicePodEnv = devicePod.spec.template.spec.containers[0].env;
assert.ok(devicePodEnv.some((entry) => entry.name === "HWLAB_CLOUD_API_INTERNAL_URL" && entry.value === "http://hwlab-cloud-api.hwlab-v02.svc.cluster.local:6667"));
const workloadTemplates = workloadsJson.items.filter((item) => item.spec?.template?.metadata?.labels?.["hwlab.pikastech.local/source-commit"]);
assert.ok(workloadTemplates.length > 0, "expected rendered pod-template source labels");
for (const item of workloadTemplates) {