build: include checker in deployment image
This commit is contained in:
parent
864320a2c8
commit
84b564ba9c
@ -1,8 +1,14 @@
|
|||||||
# 部署拓扑模板
|
# 部署拓扑模板
|
||||||
|
|
||||||
本目录描述 Proxy Pool 目标运行拓扑,覆盖 Compose、HAProxy、Prometheus、
|
本目录描述 Proxy Pool 的部署拓扑,覆盖 Compose、HAProxy、Prometheus、
|
||||||
Grafana 与 Kubernetes。配置已通过静态展开,但当前仓库的 `cmd/proxy-*`
|
Grafana 与 Kubernetes。镜像会构建 `proxy-controller`、`proxy-gateway` 与
|
||||||
运行时装配仍在实施计划中,因此不要把这些清单视为当前可部署发行版。
|
`proxy-checker`;Controller 已装配 Redis BASIC 检查任务,Checker 可通过认证
|
||||||
|
控制面执行 HTTP/HTTPS BASIC 探测。
|
||||||
|
|
||||||
|
默认 Compose 和 Kubernetes Base 仍将 `controlPlane.enabled` 保持为 `false`。
|
||||||
|
跨节点控制面必须由环境 Overlay 提供 Controller 可拨号地址、独立 Worker/Checker
|
||||||
|
身份及 mTLS 证书,因此这些默认清单不能视为完整的生产发布配置。`checker.yaml`
|
||||||
|
保留为 Overlay 模板,尚未加入 Base。
|
||||||
|
|
||||||
当前可执行验证:
|
当前可执行验证:
|
||||||
|
|
||||||
@ -18,5 +24,5 @@ go run ./deploy/tools/configcheck deploy/config/local.yaml
|
|||||||
`/var/lib/postgresql` tmpfs。`test-redis.ps1` 通过专属 Compose 项目只启动 Redis;
|
`/var/lib/postgresql` tmpfs。`test-redis.ps1` 通过专属 Compose 项目只启动 Redis;
|
||||||
PostgreSQL Adapter 和对应执行脚本完成前,不把数据库契约记为通过。
|
PostgreSQL Adapter 和对应执行脚本完成前,不把数据库契约记为通过。
|
||||||
|
|
||||||
运行时完成后,还必须通过 `production-readiness.md` 中的一致性、安全、恢复、
|
发布前仍须通过 `production-readiness.md` 中的一致性、安全、恢复、竞态与容量门禁,
|
||||||
竞态与容量门禁,才能构建镜像并发布。
|
并完成代表性集群容量验证。
|
||||||
|
|||||||
@ -142,6 +142,9 @@ func TestDeploymentEntrypointsExistInSource(t *testing.T) {
|
|||||||
if len(entrypoints) == 0 {
|
if len(entrypoints) == 0 {
|
||||||
t.Fatal("docker/Dockerfile has no proxy command build target")
|
t.Fatal("docker/Dockerfile has no proxy command build target")
|
||||||
}
|
}
|
||||||
|
if !slices.ContainsFunc(entrypoints, func(entrypoint []string) bool { return entrypoint[1] == "proxy-checker" }) {
|
||||||
|
t.Fatal("docker/Dockerfile does not build proxy-checker")
|
||||||
|
}
|
||||||
for _, entrypoint := range entrypoints {
|
for _, entrypoint := range entrypoints {
|
||||||
assertCommandDirectory(t, entrypoint[1])
|
assertCommandDirectory(t, entrypoint[1])
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,9 @@ ARG TARGETARCH=amd64
|
|||||||
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
|
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
|
||||||
go build -trimpath -ldflags="-s -w" -o /out/proxy-gateway ./cmd/proxy-gateway && \
|
go build -trimpath -ldflags="-s -w" -o /out/proxy-gateway ./cmd/proxy-gateway && \
|
||||||
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
|
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
|
||||||
go build -trimpath -ldflags="-s -w" -o /out/proxy-controller ./cmd/proxy-controller
|
go build -trimpath -ldflags="-s -w" -o /out/proxy-controller ./cmd/proxy-controller && \
|
||||||
|
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
|
||||||
|
go build -trimpath -ldflags="-s -w" -o /out/proxy-checker ./cmd/proxy-checker
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user