diff --git a/deploy/k01/apply-schema.sh b/deploy/k01/apply-schema.sh index 6bc9fe2..79edd4e 100755 --- a/deploy/k01/apply-schema.sh +++ b/deploy/k01/apply-schema.sh @@ -31,13 +31,13 @@ psql_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=() 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")"