feat: add Go workload deployment artifacts and split Ingress routing
This commit is contained in:
@@ -17,11 +17,28 @@ assert(migrationJob.includes("secretName: zhinian-rds-ca"), "migration Job must
|
||||
|
||||
const web = read("web.yaml");
|
||||
assert(/^\s*replicas: 1\s*$/m.test(web), "Web must default to one replica until object storage is shared");
|
||||
assert(web.includes("path: /api/ready"), "Web must use database-aware readiness");
|
||||
assert(web.includes("path: /api/health"), "Web must use process-level readiness (it is database-free in production)");
|
||||
assert(!web.includes("zhinian-web-db"), "Web must not hold RDS credentials in production");
|
||||
assert(!web.includes("rds-ca"), "Web must not mount the RDS CA in production");
|
||||
|
||||
const goApi = read("go-api.yaml");
|
||||
assert(/^\s*replicas: 1\s*$/m.test(goApi), "Go API must default to one replica until object storage is shared");
|
||||
assert(goApi.includes("path: /api/ready"), "Go API must use database-aware readiness");
|
||||
assert(goApi.includes("runAsNonRoot: true"), "Go API must run as a non-root user");
|
||||
assert(goApi.includes("name: zhinian-go-runtime"), "Go API must consume the Go runtime ConfigMap");
|
||||
assert(goApi.includes("name: zhinian-go-bootstrap"), "Go API must receive bootstrap administrator credentials");
|
||||
assert(goApi.includes("secretName: zhinian-rds-ca"), "Go API must mount the RDS CA");
|
||||
|
||||
const configMap = read("configmap.yaml");
|
||||
assert(configMap.includes("ZHINIAN_GO_EMBEDDED_WORKER: \"true\""), "Go runtime ConfigMap must embed the WorkerLoop");
|
||||
|
||||
const ingress = read("ingress.yaml");
|
||||
assert(ingress.includes("path: /api/internal/worker"), "Ingress must intercept the internal worker prefix");
|
||||
assert(ingress.includes("name: zhinian-public-deny"), "Ingress must route the internal prefix away from Web");
|
||||
assert(ingress.includes("name: zhinian-public-deny"), "Ingress must route the internal prefix away from the workloads");
|
||||
assert(ingress.includes("name: zhinian-go-api"), "Ingress must route backend paths to the Go API Service");
|
||||
assert(ingress.includes("path: /uploads"), "Ingress must route /uploads to the Go API");
|
||||
assert(ingress.includes("path: /generated-results"), "Ingress must route /generated-results to the Go API");
|
||||
assert(ingress.includes("name: zhinian-web"), "Ingress must route pages/static paths to Web");
|
||||
|
||||
const service = read("service.yaml");
|
||||
assert(service.includes("name: zhinian-public-deny"), "selectorless deny Service is required");
|
||||
|
||||
Reference in New Issue
Block a user