Skip to content

Commit 37c7037

Browse files
committed
debug: add verbose output to operator cleanup for pod identity deletion
1 parent e091754 commit 37c7037

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

  • manifests/modules/fastpaths/operators/.workshop

manifests/modules/fastpaths/operators/.workshop/cleanup.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ kubectl delete clustersecretstore --all --ignore-not-found 2>/dev/null || true
1616
kubectl delete externalsecret --all -A --ignore-not-found 2>/dev/null || true
1717

1818
# Delete pod identity associations for carts
19-
for assoc in $(aws eks list-pod-identity-associations --cluster-name ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto} --namespace carts --query 'associations[].associationId' --output text 2>/dev/null); do
20-
aws eks delete-pod-identity-association --cluster-name ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto} --association-id $assoc 2>/dev/null || true
19+
echo "Deleting carts pod identity associations for cluster ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto}..."
20+
for assoc in $(aws eks list-pod-identity-associations --cluster-name ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto} --namespace carts --query 'associations[].associationId' --output text 2>&1); do
21+
echo " Deleting association $assoc"
22+
aws eks delete-pod-identity-association --cluster-name ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto} --association-id $assoc 2>&1 || echo " Failed to delete $assoc"
2123
done
2224

2325
# Delete pod identity associations for keda (created by install-keda.md)
24-
for assoc in $(aws eks list-pod-identity-associations --cluster-name ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto} --namespace keda --query 'associations[].associationId' --output text 2>/dev/null); do
25-
aws eks delete-pod-identity-association --cluster-name ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto} --association-id $assoc 2>/dev/null || true
26+
echo "Deleting keda pod identity associations for cluster ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto}..."
27+
for assoc in $(aws eks list-pod-identity-associations --cluster-name ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto} --namespace keda --query 'associations[].associationId' --output text 2>&1); do
28+
echo " Deleting association $assoc"
29+
aws eks delete-pod-identity-association --cluster-name ${EKS_CLUSTER_AUTO_NAME:-eks-workshop-auto} --association-id $assoc 2>&1 || echo " Failed to delete $assoc"
2630
done
2731

2832
# Delete modified StatefulSets + PVCs (from any EBS changes)

0 commit comments

Comments
 (0)