diff --git a/deploy/kubernetes/easyai-ai-gateway-cluster-release b/deploy/kubernetes/easyai-ai-gateway-cluster-release index a2c115a..59a11bf 100755 --- a/deploy/kubernetes/easyai-ai-gateway-cluster-release +++ b/deploy/kubernetes/easyai-ai-gateway-cluster-release @@ -716,7 +716,7 @@ prepare_postgres_single_instance() { local source_sha=$1 local current_instances current_primary primary_node synchronous_enabled if ! grep -Eq '^ instances: 1$' "$DESIRED_STATE_DIR/database.yaml" || - ! grep -Eq '^ synchronous: null$' "$DESIRED_STATE_DIR/database.yaml"; then + grep -Eq '^[[:space:]]+synchronous:' "$DESIRED_STATE_DIR/database.yaml"; then echo 'production PostgreSQL desired state must declare one instance with synchronous replication disabled' >&2 return 1 fi diff --git a/deploy/kubernetes/production/database.yaml b/deploy/kubernetes/production/database.yaml index d50d7e4..8c77060 100644 --- a/deploy/kubernetes/production/database.yaml +++ b/deploy/kubernetes/production/database.yaml @@ -117,9 +117,6 @@ spec: cpu: "2" memory: 3Gi postgresql: - # 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. diff --git a/tests/release/manual-release-test.sh b/tests/release/manual-release-test.sh index f4bfd57..ddf062e 100755 --- a/tests/release/manual-release-test.sh +++ b/tests/release/manual-release-test.sh @@ -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"