Prepare verified laboratory 7 implementation and evidence

This commit is contained in:
rey
2026-11-17 17:32:06 +03:00
parent 20afc2c790
commit eb1b5c7b84
677 changed files with 208256 additions and 64 deletions
+26
View File
@@ -0,0 +1,26 @@
import { run, requireThat } from "./runtime";
import { containerID } from "./runtime-inspect";
const gateways = [
"lb",
"api1-gateway",
"api2-gateway",
"worker-gateway",
"broker-gateway",
"s3-gateway",
"collector-gateway",
"openobserve-gateway",
"grafana-gateway",
];
export async function reloadGateway(service: string) {
requireThat(gateways.includes(service), "INVALID_GATEWAY_TARGET");
const id = await containerID(service);
const state = JSON.parse((await run(["docker", "inspect", id])).out)[0];
requireThat(
state.Config.Labels["com.docker.compose.project"] ===
"mtuci-vp7-security" && state.State.Running === true,
"GATEWAY_NOT_OWNED_RUNNING",
);
// Native HAProxy master-worker reload preserves the network namespace used by sidecars.
// hard-stop-after2s drains old TLS connections so revoked clients cannot keep a pool alive forever.
await run(["docker", "kill", "--signal", "USR2", id]);
}