diff --git a/.github/workflows/argo-cd-bootstrap.yaml b/.github/workflows/argo-cd-bootstrap.yaml index 347d149..3afb219 100644 --- a/.github/workflows/argo-cd-bootstrap.yaml +++ b/.github/workflows/argo-cd-bootstrap.yaml @@ -86,6 +86,7 @@ jobs: - name: set dns record to alb run: | + ## Get the ALB ARN alb_arn=$(aws elbv2 describe-load-balancers --region ${{ secrets.AWS_REGION }} | jq -r '.LoadBalancers[].LoadBalancerArn' | xargs -I {} aws --region ${{ secrets.AWS_REGION }} elbv2 describe-tags --resource-arns {} --query "TagDescriptions[?Tags[?Key=='ingress.k8s.aws/stack' &&Value=='eks-lab-ingress']].ResourceArn" --output text) ## Get the ALB DNS Name alb_dns=$(aws elbv2 describe-load-balancers --region ${{ secrets.AWS_REGION }} --query "LoadBalancers[?LoadBalancerArn=='${alb_arn}'].DNSName" --output text) @@ -93,6 +94,7 @@ jobs: hosted_zone_id=$(aws route53 list-hosted-zones --query "HostedZones[?Name=='caiogomes.me.'].Id" --output text) ## Set the DNS record to the ALB DNS Name aws route53 change-resource-record-sets --hosted-zone-id $hosted_zone_id --change-batch '{"Changes":[{"Action":"UPSERT","ResourceRecordSet":{"Name":"*.eks.caiogomes.me.","Type":"CNAME","TTL":300,"ResourceRecords":[{"Value":"'${alb_dns}'"}]}}]}' + - name: set argocd admin password run: | kubectl -n argocd patch secret argocd-secret -p '{"stringData": {"admin.password": "${{ secrets.ARGOCD_ADMIN_PASSWORD }}"}}'