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
+10 -9
View File
@@ -63,7 +63,9 @@ metadata:
app.kubernetes.io/name: easyai-postgres
app.kubernetes.io/part-of: easyai-ai-gateway
spec:
instances: 2
# Production currently uses one Ningbo primary. Cross-region replicas are
# intentionally disabled until a separately certified HA topology exists.
instances: 1
imageName: ghcr.io/cloudnative-pg/postgresql:18.4-standard-trixie@sha256:4587df73024408f5b2be9b4dd6ba2ccee8c9e5dc0c9a87c274c292291cc8a68c
imagePullPolicy: IfNotPresent
env:
@@ -106,6 +108,7 @@ spec:
topologyKey: easyai.io/site
nodeSelector:
easyai.io/database: "true"
easyai.io/site: ningbo
resources:
requests:
cpu: 500m
@@ -114,10 +117,9 @@ spec:
cpu: "2"
memory: 3Gi
postgresql:
synchronous:
method: any
number: 1
dataDurability: preferred
# Keep this explicit null so server-side apply atomically removes the old
# two-instance synchronous setting during preflight field management.
synchronous: null
parameters:
# A 16 MiB WAL segment every 60 seconds requires at least 2.24 Mbit/s
# of continuous cross-region throughput even while the database is idle.
@@ -129,10 +131,9 @@ spec:
wal_compression: "on"
wal_keep_size: 1GB
# CNPG defaults these cross-region liveness timers to 5 seconds. A short
# control-plane or pod-network stall can otherwise tear down a healthy
# WAL stream and make preferred synchronous replication fall back to
# async. Keep failure detection bounded without amplifying a transient
# multi-second stall into repeated reconnects.
# control-plane or pod-network stall can otherwise tear down a future
# WAL stream. Keep failure detection bounded without amplifying a
# transient multi-second stall into repeated reconnects.
wal_sender_timeout: 30s
wal_receiver_timeout: 30s
monitoring: