Add deployment verification with health check polling
- Add --wait --timeout 5m to helm upgrade - Add kubectl rollout status check - Poll health endpoint for up to 5 minutes (for cert provisioning)
This commit is contained in:
@@ -85,7 +85,25 @@ deploy_feature:
|
|||||||
--set ingress.tls[0].hosts[0]=orchard-$CI_COMMIT_REF_SLUG.common.global.bsf.tools \
|
--set ingress.tls[0].hosts[0]=orchard-$CI_COMMIT_REF_SLUG.common.global.bsf.tools \
|
||||||
--set ingress.tls[0].secretName=orchard-$CI_COMMIT_REF_SLUG-tls \
|
--set ingress.tls[0].secretName=orchard-$CI_COMMIT_REF_SLUG-tls \
|
||||||
--set minioIngress.host=minio-$CI_COMMIT_REF_SLUG.common.global.bsf.tools \
|
--set minioIngress.host=minio-$CI_COMMIT_REF_SLUG.common.global.bsf.tools \
|
||||||
--set minioIngress.tls.secretName=minio-$CI_COMMIT_REF_SLUG-tls
|
--set minioIngress.tls.secretName=minio-$CI_COMMIT_REF_SLUG-tls \
|
||||||
|
--wait \
|
||||||
|
--timeout 5m
|
||||||
|
- echo "Waiting for deployment to be ready..."
|
||||||
|
- kubectl rollout status deployment/orchard-$CI_COMMIT_REF_SLUG -n $NAMESPACE --timeout=5m
|
||||||
|
- |
|
||||||
|
echo "Waiting for health endpoint (certs may take a few minutes)..."
|
||||||
|
HEALTH_URL="https://orchard-$CI_COMMIT_REF_SLUG.common.global.bsf.tools/health"
|
||||||
|
for i in $(seq 1 30); do
|
||||||
|
if curl -sf --max-time 10 "$HEALTH_URL" > /dev/null 2>&1; then
|
||||||
|
echo "Health check passed!"
|
||||||
|
curl -s "$HEALTH_URL" | head -c 200
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Attempt $i/30 - waiting 10s..."
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
echo "Health check failed after 5 minutes"
|
||||||
|
exit 1
|
||||||
environment:
|
environment:
|
||||||
name: review/$CI_COMMIT_REF_SLUG
|
name: review/$CI_COMMIT_REF_SLUG
|
||||||
url: https://orchard-$CI_COMMIT_REF_SLUG.common.global.bsf.tools
|
url: https://orchard-$CI_COMMIT_REF_SLUG.common.global.bsf.tools
|
||||||
|
|||||||
Reference in New Issue
Block a user