Skip to content

Commit

Permalink
preserve the resources
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Santana <[email protected]>
  • Loading branch information
csantanapr committed Oct 27, 2023
1 parent 1b181fa commit 00e361c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 8 additions & 4 deletions patterns/gitops/getting-started-argocd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ Verify Addons are ready
```shell
kubectl get applications -n argocd \
addon-getting-started-gitops-aws-load-balancer-controller \
addon-getting-started-gitops-metrics-server
addon-getting-started-gitops-metrics-server \
addon-getting-started-gitops-argo-cd
kubectl get sts -n argocd
kubectl get deployment -n kube-system \
aws-load-balancer-controller \
metrics-server
Expand All @@ -44,15 +46,17 @@ kubectl get -n game-2048 deployments
kubectl get -n game-2048 ingress
```

Get the Ingress URL for the Application
Get the Ingress URL for the Application (You need to wait 2 minutes for Load Balancer to be created)
```shell
echo "Application URL: http://$(kubectl get -n game-2048 ingress ingress-2048 -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')"
echo "Application URL: http://$(kubectl get -n game-2048 ingress game-2048 -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')"
```

Verify Application from Terminal
```shell
curl -I $(kubectl get -n game-2048 ingress ingress-2048 -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
curl -I $(kubectl get -n game-2048 ingress game-2048 -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
```


Destroy EKS Cluster
```shell
./destroy.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: argocd
spec:
syncPolicy:
preserveResourcesOnDeletion: false
preserveResourcesOnDeletion: true
generators:
- clusters: {}
template:
Expand Down
4 changes: 3 additions & 1 deletion patterns/gitops/getting-started-argocd/destroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ terraform -chdir=$SCRIPTDIR output -raw configure_kubectl > "$TMPFILE"
if [[ ! $(cat $TMPFILE) == *"No outputs found"* ]]; then
source "$TMPFILE"
kubectl delete -n argocd applicationset workloads
echo "Waiting for ingress and load balancer to be deleted"
sleep 240
kubectl delete -n argocd applicationset cluster-addons
kubectl delete -n argocd application addon-dev-argo-cd
kubectl delete -n argocd applicationset addons-argocd
kubectl delete -n argocd svc argo-cd-argocd-server
fi

Expand Down

0 comments on commit 00e361c

Please sign in to comment.