fix(querybook): wait deployment ready on install

This commit is contained in:
Masaki Yatsu
2025-11-05 11:13:26 +09:00
parent 5673e771f4
commit 5aef2e9c38

View File

@@ -247,6 +247,27 @@ install:
-n ${QUERYBOOK_NAMESPACE} --wait \ -n ${QUERYBOOK_NAMESPACE} --wait \
-f querybook-values.yaml -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 ""
echo "Querybook installed successfully!" echo "Querybook installed successfully!"
echo "Access URL: https://${QUERYBOOK_HOST}" echo "Access URL: https://${QUERYBOOK_HOST}"