Skip to content

Commit 6854674

Browse files
committed
Add steps to print service endpoints and credentials for ArgoCD, Prometheus, and Grafana
1 parent 7b378ee commit 6854674

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ jobs:
8787
run: |
8888
kubectl apply -f ./argocd/application.yml
8989
90-
- name: Get Application URL
90+
- name: Print Service Endpoints
9191
run: |
92-
echo "Application URL: http://$(kubectl get svc solar-system-svc -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')"
92+
echo "================= SERVICE ENDPOINTS ================="
93+
echo "ArgoCD: http://$(kubectl get svc argocd-server -n argocd -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')"
94+
echo "Prometheus: http://$(kubectl get svc kube-prometheus-stack-prometheus -n monitoring -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'):9090"
95+
echo "Grafana: http://$(kubectl get svc kube-prometheus-stack-grafana -n monitoring -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')"
96+
echo "App: http://$(kubectl get svc my-app-svc -n my-app-namespace -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')"
97+
98+
echo "================= DEFAULT CREDENTIALS ================="
99+
echo "ArgoCD -> Username: admin"
100+
echo "ArgoCD -> Password: $(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d)"
101+
echo "Grafana -> Username: admin"
102+
echo "Grafana -> Password: $(kubectl get secret kube-prometheus-stack-grafana -n monitoring -o jsonpath='{.data.admin-password}' | base64 -d)"
103+
echo "Prometheus -> No login needed (anonymous access by default)"

.github/workflows/terraform.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,35 @@ jobs:
8686
run: |
8787
kubectl apply -f ./argocd/monitoring.yml
8888
89+
# ---------------------------
90+
# Print Access URLs & Credentials
91+
# ---------------------------
92+
- name: Get ArgoCD URL
93+
if: ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
94+
run: |
95+
echo "ArgoCD URL:"
96+
kubectl get svc argocd-server -n argocd -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
97+
echo ""
98+
echo "ArgoCD Username: admin"
99+
echo "ArgoCD Password:"
100+
kubectl -n argocd get secret argocd-initial-admin-secret \
101+
-o jsonpath="{.data.password}" | base64 --decode
102+
echo ""
103+
104+
- name: Get Prometheus URL
105+
if: ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
106+
run: |
107+
echo "Prometheus URL:"
108+
kubectl get svc kube-prometheus-stack-prometheus -n monitoring \
109+
-o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
110+
echo ""
111+
112+
- name: Get Grafana URL
113+
if: ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
114+
run: |
115+
echo "Grafana URL:"
116+
kubectl get svc kube-prometheus-stack-grafana -n monitoring \
117+
-o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
118+
echo ""
119+
echo "Grafana Username: admin"
120+
echo "Grafana Password: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}"

0 commit comments

Comments
 (0)