2828 required : false
2929 default : ' '
3030 type : string
31+
3132jobs :
3233 print-endpoints :
3334 name : Print Service Endpoints
@@ -39,26 +40,65 @@ jobs:
3940 with :
4041 role-to-assume : arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubActionsInfraRole
4142 aws-region : us-east-1
42-
43+
4344 - name : Update kubeconfig
4445 run : |
4546 aws eks update-kubeconfig --name ${{ inputs.cluster_name }} --region us-east-1
47+
4648 - name : Print Service Endpoints
4749 run : |
4850 echo "================= SERVICE ENDPOINTS ================="
51+
52+ # Get ArgoCD endpoint (still using LoadBalancer)
4953 ARGOCD_HOST=$(kubectl get svc argocd-server -n ${{ inputs.argocd_namespace }} -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo 'Not found')
50- MONITORING_HOST=$(kubectl get ingress monitoring-ingress -n ${{ inputs.monitoring_namespace }} -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo 'Not found')
54+
55+ # Get monitoring ingress endpoint (single endpoint for all monitoring services)
56+ MONITORING_HOST=$(kubectl get ingress monitoring-ingress -n ${{ inputs.monitoring_namespace }} -o jsonpath='{.spec.rules[0].host}' 2>/dev/null || echo 'Not found')
57+
58+ # Alternative: get ingress from kube-prometheus-stack if using helm ingress
59+ if [ "$MONITORING_HOST" = "Not found" ]; then
60+ MONITORING_HOST=$(kubectl get ingress -n ${{ inputs.monitoring_namespace }} -l app.kubernetes.io/name=kube-prometheus-stack -o jsonpath='{.items[0].spec.rules[0].host}' 2>/dev/null || echo 'Not found')
61+ fi
62+
63+ # Get app endpoint
5164 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')
65+
66+ # Print endpoints
5267 echo "ArgoCD: http://$ARGOCD_HOST"
53- echo "Monitoring (All-in-One): http://$MONITORING_HOST"
54- echo " ├── Grafana: http://$MONITORING_HOST/grafana"
55- echo " ├── Prometheus: http://$MONITORING_HOST/prometheus"
56- echo " └── AlertManager: http://$MONITORING_HOST/alertmanager"
68+
69+ if [ "$MONITORING_HOST" != "Not found" ]; then
70+ echo "Prometheus: http://$MONITORING_HOST/prometheus"
71+ echo "Grafana: http://$MONITORING_HOST/grafana"
72+ echo "Alertmanager: http://$MONITORING_HOST/alertmanager"
73+ else
74+ echo "Monitoring services: Not found (check ingress configuration)"
75+ fi
76+
5777 echo "App: http://$APP_HOST"
78+
79+ echo ""
80+ echo "================= INGRESS STATUS ================="
81+
82+ # Show ingress details for debugging
83+ echo "Monitoring Ingress Status:"
84+ kubectl get ingress -n ${{ inputs.monitoring_namespace }} -o wide 2>/dev/null || echo "No ingress found in monitoring namespace"
85+
86+ echo ""
87+ echo "Load Balancer Services:"
88+ kubectl get svc -A --field-selector spec.type=LoadBalancer -o wide
89+
90+ echo ""
5891 echo "================= DEFAULT CREDENTIALS ================="
92+
5993 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')
6094 echo "ArgoCD -> Username: admin"
6195 echo "ArgoCD -> Password: $ARGOCD_PASS"
6296 echo "Grafana -> Username: admin"
6397 echo "Grafana -> Password: ${{ secrets.GRAFANA_PASSWORD }}"
6498 echo "Prometheus -> No login needed (anonymous access by default)"
99+
100+ echo ""
101+ echo "================= CONFIGURATION NOTES ================="
102+ echo "• Monitoring services are accessed through a single ingress endpoint"
103+ echo "• Make sure your DNS points to the ingress controller's LoadBalancer"
104+ echo "• If monitoring host shows 'Not found', check ingress controller deployment"
0 commit comments