Skip to content

Commit d83567d

Browse files
authored
Update endpoints.yml
1 parent 63e79c5 commit d83567d

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

.github/workflows/endpoints.yml

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ jobs:
5555
APP_HOST=$(kubectl get svc ${{ inputs.app_name }}-svc -n ${{ inputs.app_namespace }} -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo 'Not found')
5656
5757
# Monitoring ingress information
58-
NGINX_HOSTNAME=$(kubectl get svc -n ingress-nginx ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
58+
MONITORING_DOMAIN=$(kubectl get ingress -n ${{ inputs.monitoring_namespace }} -o jsonpath='{.items[0].spec.rules[0].host}' 2>/dev/null || echo 'Not found')
59+
INGRESS_IP=$(kubectl get ingress -n ${{ inputs.monitoring_namespace }} -o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}' 2>/dev/null || echo '')
60+
INGRESS_HOSTNAME=$(kubectl get ingress -n ${{ inputs.monitoring_namespace }} -o jsonpath='{.items[0].status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo '')
5961
6062
# NGINX ingress controller LoadBalancer
6163
NGINX_LB=$(kubectl get svc -n ingress-nginx ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo 'Not found')
@@ -65,23 +67,48 @@ jobs:
6567
echo "🌟 App: http://$APP_HOST"
6668
echo ""
6769
echo "📊 Monitoring Services (via Ingress):"
68-
if [ "$NGINX_HOSTNAME" != "Not found" ]; then
69-
echo " Domain: $NGINX_HOSTNAME"
70-
echo " 📊 Prometheus: http://$NGINX_HOSTNAME/prometheus"
71-
echo " 📈 Grafana: http://$NGINX_HOSTNAME/grafana"
72-
echo " 🚨 Alertmanager: http://$NGINX_HOSTNAME/alertmanager"
70+
if [ "$MONITORING_DOMAIN" != "Not found" ]; then
71+
echo " Domain: $MONITORING_DOMAIN"
72+
echo " 📊 Prometheus: http://$MONITORING_DOMAIN/prometheus"
73+
echo " 📈 Grafana: http://$MONITORING_DOMAIN/grafana"
74+
echo " 🚨 Alertmanager: http://$MONITORING_DOMAIN/alertmanager"
75+
echo ""
76+
echo " Ingress Status:"
77+
[ ! -z "$INGRESS_IP" ] && echo " IP: $INGRESS_IP"
78+
[ ! -z "$INGRESS_HOSTNAME" ] && echo " LoadBalancer: $INGRESS_HOSTNAME"
79+
else
80+
echo " ⚠️ Ingress not found or not ready"
7381
fi
82+
7483
echo ""
7584
echo "🌐 NGINX Ingress Controller: $NGINX_LB"
7685
86+
echo ""
87+
echo "================= DETAILED INGRESS STATUS ================="
88+
echo "All Ingress Resources:"
89+
kubectl get ingress -A -o wide 2>/dev/null || echo "No ingress resources found"
90+
echo ""
91+
echo "Monitoring Namespace Ingress Details:"
92+
kubectl describe ingress -n ${{ inputs.monitoring_namespace }} 2>/dev/null || echo "No ingress in monitoring namespace"
93+
94+
echo ""
95+
echo "================= SERVICE STATUS ================="
96+
echo "Monitoring Services (should be ClusterIP):"
97+
kubectl get svc -n ${{ inputs.monitoring_namespace }} -l app.kubernetes.io/instance=kube-prometheus-stack 2>/dev/null || echo "No monitoring services found"
98+
99+
echo ""
100+
echo "All LoadBalancer Services:"
101+
kubectl get svc -A --field-selector spec.type=LoadBalancer -o wide 2>/dev/null || echo "No LoadBalancer services found"
102+
103+
echo ""
104+
echo "NGINX Ingress Controller Status:"
105+
kubectl get svc -n ingress-nginx -o wide 2>/dev/null || echo "NGINX Ingress Controller not found"
106+
77107
echo ""
78108
echo "================= DEFAULT CREDENTIALS ================="
79109
ARGOCD_PASS=$(kubectl -n ${{ inputs.argocd_namespace }} get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' 2>/dev/null | base64 -d || echo 'Not found')
80110
echo "ArgoCD -> Username: admin"
81111
echo "ArgoCD -> Password: $ARGOCD_PASS"
82112
echo "Grafana -> Username: admin"
83-
echo "Grafana -> Password: (stored in GitHub Secrets, not printed)"
113+
echo "Grafana -> Password: ${{ secrets.GRAFANA_PASSWORD }}"
84114
echo "Prometheus -> No login needed (anonymous access by default)"
85-
echo "Alertmanager -> No login needed (anonymous access by default)"
86-
echo ""
87-
echo "⚠️ Note: It may take a few minutes for LoadBalancer endpoints to become fully available after deployment."

0 commit comments

Comments
 (0)