fix(cluster): 收敛宁波单实例数据库拓扑

将生产 CNPG 固定为宁波单实例,并显式关闭旧同步复制配置。发布流程在拓扑收敛前校验主库位置并创建 OSS 备份,应用后验证单实例、无复制连接和主库可用。同步更新生产监控、集群验收和发布脚本回归测试。
This commit is contained in:
2026-08-04 23:24:37 +08:00
parent 4b639df30a
commit 8ef9de0b06
6 changed files with 102 additions and 24 deletions
@@ -102,6 +102,11 @@ fi
grep -Fq 'AI_GATEWAY_WORKER_REPLICAS_HONGKONG=1' \
"$root/deploy/kubernetes/easyai-ai-gateway-cluster-release.conf.example"
grep -Fq "hongkong) replicas=\$AI_GATEWAY_WORKER_REPLICAS_HONGKONG" "$helper"
grep -Fq "prepare_postgres_single_instance \"\$source_sha\"" "$helper"
grep -Fq "'production PostgreSQL desired state must declare one instance with synchronous replication disabled'" "$helper"
grep -Fq 'refusing PostgreSQL downscale while primary is outside Ningbo' "$helper"
grep -Fq 'production_postgres=PASS topology=ningbo-single-instance' "$helper"
grep -Fq -- "-p '{\"spec\":{\"postgresql\":{\"synchronous\":null}}}'" "$helper"
grep -Fq "\"\${kubectl[@]}\" replace -f -" "$helper"
if grep -Fq "\"\${kubectl[@]}\" apply -f \"\$snapshot\"" "$helper"; then
echo 'deployment rollback still uses merge semantics instead of exact restore' >&2
+3
View File
@@ -314,6 +314,9 @@ if grep -Fq 'archive_timeout: 60s' "$root/deploy/kubernetes/production/database.
echo 'production archive timeout would exceed the certified cross-region bandwidth floor' >&2
exit 1
fi
grep -Fq ' instances: 1' "$root/deploy/kubernetes/production/database.yaml"
grep -Fq ' easyai.io/site: ningbo' "$root/deploy/kubernetes/production/database.yaml"
grep -Fq ' synchronous: null' "$root/deploy/kubernetes/production/database.yaml"
grep -Fq 'wal_sender_timeout: 30s' "$root/deploy/kubernetes/production/database.yaml"
grep -Fq 'wal_receiver_timeout: 30s' "$root/deploy/kubernetes/production/database.yaml"
bash -n "$root/scripts/cluster/configure-control-plane-io.sh"