Skip to content

Commit

Permalink
Adding destroy k8s resources to eks cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
caiocsgomes committed Jun 29, 2024
1 parent 7ab1f0f commit 1ab0311
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/terraform-destroy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@ jobs:
# - name: delete app of apps
# run: kubectl delete -f kubernetes/app-of-apps.yaml

- name: configure kubectl
run: |
aws eks update-kubeconfig --name ${{ secrets.EKS_CLUSTER_NAME }} --region ${{ secrets.AWS_REGION }}
- name: checkout code
uses: actions/checkout@v4

- name: install cluster app of apps
run: kubectl delete -f kubernetes/app-of-apps.yaml

- name: verify if all apps are synced
run: |
while true; do
sync_status=`(kubectl -n argocd get Application -o=jsonpath='{.items[*].status.sync.status}')`
for status in $sync_status; do
if [ "$status" != "Synced" ]; then
echo "Not all apps are synced, waiting 10 seconds"
sleep 10
continue 2
fi
break 2
done
done
- name: terraform init
run: terraform init
working-directory: terraform/environments/prod
Expand Down

0 comments on commit 1ab0311

Please sign in to comment.