fix: move web sentinel publish to k8s buildkit

This commit is contained in:
Codex
2026-06-30 08:19:38 +00:00
parent 74c4d1e9ed
commit 6889f6a133
8 changed files with 286 additions and 134 deletions
+7 -2
View File
@@ -29,6 +29,7 @@ export interface HwlabProxySpec {
export interface HwlabNetworkProfileSpec {
readonly id: string;
readonly proxy: HwlabProxySpec;
readonly imageBuildProxy: HwlabProxySpec;
readonly dockerBuildProxy: HwlabProxySpec;
}
@@ -613,7 +614,7 @@ function optionalStringRecord(value: unknown, path: string): Record<string, stri
}));
}
function proxyConfig(raw: Record<string, unknown>, id: string, key: "proxy" | "dockerBuildProxy", requiredNoProxy: readonly string[]): HwlabProxySpec {
function proxyConfig(raw: Record<string, unknown>, id: string, key: "proxy" | "imageBuildProxy" | "dockerBuildProxy", requiredNoProxy: readonly string[]): HwlabProxySpec {
const proxy = asRecord(raw[key], `networkProfiles.${id}.${key}`);
return {
http: stringField(proxy, "http", `networkProfiles.${id}.${key}`),
@@ -625,10 +626,14 @@ function proxyConfig(raw: Record<string, unknown>, id: string, key: "proxy" | "d
}
function networkProfileConfig(id: string, raw: Record<string, unknown>, requiredNoProxy: readonly string[]): HwlabNetworkProfileSpec {
const imageBuildProxy = raw.imageBuildProxy === undefined
? proxyConfig(raw, id, "dockerBuildProxy", requiredNoProxy)
: proxyConfig(raw, id, "imageBuildProxy", requiredNoProxy);
return {
id,
proxy: proxyConfig(raw, id, "proxy", requiredNoProxy),
dockerBuildProxy: proxyConfig(raw, id, "dockerBuildProxy", requiredNoProxy),
imageBuildProxy,
dockerBuildProxy: raw.dockerBuildProxy === undefined ? imageBuildProxy : proxyConfig(raw, id, "dockerBuildProxy", requiredNoProxy),
};
}