Skip to content

Commit

Permalink
Adding small comment to argocd workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
caiocsgomes committed Jun 26, 2024
1 parent 6aa8954 commit 8d60d86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/argo-cd-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ 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)
## Get hosted zone id
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 }}"}}'

0 comments on commit 8d60d86

Please sign in to comment.