From 5aef2e9c383b160f887da79940d1cf7996f8493c Mon Sep 17 00:00:00 2001 From: Masaki Yatsu Date: Wed, 5 Nov 2025 11:13:26 +0900 Subject: [PATCH] fix(querybook): wait deployment ready on install --- querybook/justfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/querybook/justfile b/querybook/justfile index b3e0227..5335401 100644 --- a/querybook/justfile +++ b/querybook/justfile @@ -247,6 +247,27 @@ install: -n ${QUERYBOOK_NAMESPACE} --wait \ -f querybook-values.yaml + echo "" + echo "Waiting for web deployment to be ready..." + kubectl wait --for=condition=Available deployment/web \ + -n ${QUERYBOOK_NAMESPACE} --timeout=300s + + echo "Waiting for service to be accessible at https://${QUERYBOOK_HOST} ..." + for i in {1..60}; do + http_code=$(curl -k -s -o /dev/null -w "%{http_code}" https://${QUERYBOOK_HOST} 2>/dev/null || echo "000") + if echo "${http_code}" | grep -q -E "200|302|401|403"; then + echo "Service is now accessible (HTTP ${http_code})" + break + fi + if [ $i -eq 60 ]; then + echo "Warning: Service may not be fully accessible yet (last status: ${http_code})" + echo "Please wait a few more minutes and try accessing the URL" + else + echo "Waiting for service to respond... ($i/60, current status: ${http_code})" + sleep 5 + fi + done + echo "" echo "Querybook installed successfully!" echo "Access URL: https://${QUERYBOOK_HOST}"