fix(cluster): 兼容 CNPG 单实例预检
发布前先通过 merge patch 删除旧同步复制配置,期望清单不再写入 CRD 不接受的 null 值,确保 server-side dry-run 与正式 apply 使用相同的有效单实例状态。
This commit is contained in:
@@ -316,7 +316,10 @@ if grep -Fq 'archive_timeout: 60s' "$root/deploy/kubernetes/production/database.
|
||||
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"
|
||||
if grep -Eq '^[[:space:]]+synchronous:' "$root/deploy/kubernetes/production/database.yaml"; then
|
||||
echo 'production single-instance PostgreSQL must not declare synchronous replication' >&2
|
||||
exit 1
|
||||
fi
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user