diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 64fb843..2df5bb1 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -218,7 +218,20 @@ jobs: # Wait for rollout echo "⏳ Waiting for rollout to finish..." - kubectl rollout status deployment/florale-emotion-frontend -n florale-emotion --timeout=300s + kubectl rollout status deployment/florale-emotion-frontend -n florale-emotion --timeout=600s || { + echo "❌ Rollout failed. Dumping diagnostics..." + kubectl get pods -n florale-emotion -o wide || true + kubectl describe deployment/florale-emotion-frontend -n florale-emotion || true + kubectl describe pods -n florale-emotion -l app=florale-emotion-frontend || true + echo "Recent events:" + kubectl get events -n florale-emotion --sort-by=.metadata.creationTimestamp | tail -n 50 || true + echo "Frontend logs (last 200 lines per pod):" + for p in $(kubectl get pods -n florale-emotion -l app=florale-emotion-frontend -o jsonpath='{.items[*].metadata.name}' 2>/dev/null); do + echo "--- logs: $p ---" + kubectl logs -n florale-emotion "$p" --tail=200 || true + done + exit 1 + } echo "✅ Feature branch deployment complete!" echo "🌐 Dev URL: https://dev.florale-emotion.de" @@ -462,7 +475,20 @@ jobs: # Wait for rollout echo "⏳ Waiting for rollout to finish..." - kubectl rollout status deployment/florale-emotion-frontend -n florale-emotion --timeout=300s + kubectl rollout status deployment/florale-emotion-frontend -n florale-emotion --timeout=600s || { + echo "❌ Rollout failed. Dumping diagnostics..." + kubectl get pods -n florale-emotion -o wide || true + kubectl describe deployment/florale-emotion-frontend -n florale-emotion || true + kubectl describe pods -n florale-emotion -l app=florale-emotion-frontend || true + echo "Recent events:" + kubectl get events -n florale-emotion --sort-by=.metadata.creationTimestamp | tail -n 50 || true + echo "Frontend logs (last 200 lines per pod):" + for p in $(kubectl get pods -n florale-emotion -l app=florale-emotion-frontend -o jsonpath='{.items[*].metadata.name}' 2>/dev/null); do + echo "--- logs: $p ---" + kubectl logs -n florale-emotion "$p" --tail=200 || true + done + exit 1 + } echo "✅ Production deployment complete!" echo "🌐 Website: https://florale-emotion.de" diff --git a/website/k8s/frontend.yaml b/website/k8s/frontend.yaml index 3e32856..d056b79 100644 --- a/website/k8s/frontend.yaml +++ b/website/k8s/frontend.yaml @@ -30,13 +30,13 @@ spec: cpu: "200m" livenessProbe: httpGet: - path: / + path: /health port: 80 initialDelaySeconds: 30 periodSeconds: 10 readinessProbe: httpGet: - path: / + path: /health port: 80 initialDelaySeconds: 5 periodSeconds: 5