fix(k01): apply-schema drop owned objects and wait all clusters
build-and-push-harbor / docker-build-push (push) Has been cancelled

This commit is contained in:
zetaloop
2026-05-06 14:02:53 +08:00
parent 68bdb9797b
commit 92f8344cc2
+3 -1
View File
@@ -36,11 +36,13 @@ while IFS= read -r name; do
clusters+=("$name")
done < <(kubectl -n juwan get cluster -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n')
kubectl -n juwan wait --for=condition=Ready cluster.postgresql.cnpg.io --all --timeout=600s
for cluster in "${clusters[@]}"; do
domain="${cluster%-db}"
dir="$(domain_dir "$domain")"
echo "$cluster"
kubectl -n juwan wait --for=condition=Ready "cluster.postgresql.cnpg.io/${cluster}" --timeout=300s
psql_exec "$cluster" "DROP OWNED BY app CASCADE;"
psql_file "$cluster" "$SQL_DIR/common/update_updated_at_column.sql"
for f in "$SQL_DIR/$dir"/*.sql; do
[ -f "$f" ] || continue