fix(k01): apply-schema list clusters after wait to avoid race
build-and-push-harbor / docker-build-push (push) Has been cancelled

This commit is contained in:
zetaloop
2026-05-06 14:16:07 +08:00
parent 92f8344cc2
commit d7af39aced
+2 -2
View File
@@ -31,13 +31,13 @@ psql_file() {
psql -v ON_ERROR_STOP=1 -h 127.0.0.1 -U app -d app < "$file" psql -v ON_ERROR_STOP=1 -h 127.0.0.1 -U app -d app < "$file"
} }
kubectl -n juwan wait --for=condition=Ready cluster.postgresql.cnpg.io --all --timeout=600s
clusters=() clusters=()
while IFS= read -r name; do while IFS= read -r name; do
clusters+=("$name") clusters+=("$name")
done < <(kubectl -n juwan get cluster -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n') 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 for cluster in "${clusters[@]}"; do
domain="${cluster%-db}" domain="${cluster%-db}"
dir="$(domain_dir "$domain")" dir="$(domain_dir "$domain")"