@@ -52,38 +52,48 @@ jobs:
5252 run : terraform apply -auto-approve
5353 working-directory : ./Terraform
5454
55+ # ---------------------------
56+ # Install ArgoCD with Helm
57+ # ---------------------------
5558 - name : Update kubeconfig
5659 if : ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
5760 run : |
5861 aws eks update-kubeconfig --name otel-cluster --region us-east-1
5962
60- - name : Wait for ArgoCD LoadBalancer
63+ - name : Install Helm
64+ if : ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
65+ 66+ with :
67+ version : v3.14.0
68+
69+ - name : Add ArgoCD Helm Repo
6170 if : ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
6271 run : |
63- echo "Waiting for ArgoCD LoadBalancer to be ready..."
64- kubectl wait --for=condition=available --timeout=300s deployment/argocd-server -n argocd || true
65- sleep 30
72+ helm repo add argo https://argoproj.github.io/argo-helm
73+ helm repo update
6674
67- - name : Get ArgoCD Access Info
75+ - name : Install/Upgrade ArgoCD
6876 if : ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
6977 run : |
70- echo "=========================================="
71- echo "🚀 ARGOCD ACCESS INFORMATION"
72- echo "=========================================="
73-
74- # Get ArgoCD URL
75- ARGOCD_URL=$(kubectl get svc argocd-server -n argocd -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo "Still loading...")
76- echo "📋 ArgoCD URL: http://$ARGOCD_URL"
78+ helm upgrade --install argocd argo/argo-cd \
79+ --namespace argocd \
80+ --create-namespace \
81+ --version 6.7.2 \
82+ --wait
83+
84+
85+ # ---------------------------
86+ # Get ArgoCD Server URL
87+ # ---------------------------
88+ - name : Get ArgoCD URL
89+ if : ${{ inputs.terraform-action == 'apply' || inputs.terraform-action == '' }}
90+ run : |
91+ echo "Waiting for ArgoCD LoadBalancer..."
92+ kubectl wait --for=condition=available deployment/argocd-server -n argocd --timeout=300s || true
7793
78- # Get admin password
79- ARGOCD_PASSWORD=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' 2>/dev/null | base64 -d || echo "Secret not ready yet")
80- echo "🔑 Username: admin"
81- echo "🔑 Password: $ARGOCD_PASSWORD"
94+ ARGOCD_URL=$(kubectl get svc argocd-server -n argocd -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
95+ if [ -z "$ARGOCD_URL" ]; then
96+ ARGOCD_URL=$(kubectl get svc argocd-server -n argocd -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
97+ fi
8298
83- echo "=========================================="
84- echo "📝 Instructions:"
85- echo "1. Wait a few minutes for LoadBalancer DNS to propagate"
86- echo "2. Access: http://$ARGOCD_URL"
87- echo "3. Login with username 'admin' and password above"
88- echo "4. Your solar-system app should appear automatically"
89- echo "=========================================="
99+ echo "ArgoCD URL: http://$ARGOCD_URL"
0 commit comments