File tree Expand file tree Collapse file tree 2 files changed +5
-101
lines changed Expand file tree Collapse file tree 2 files changed +5
-101
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,9 @@ eksctl utils associate-iam-oidc-provider \
27
27
--approve
28
28
29
29
echo " Creating AWSLoadbalancerController IAM Policy"
30
- curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.2.1/docs/install/iam_policy.json
31
-
32
30
aws iam create-policy \
33
31
--policy-name AWSLoadBalancerControllerIAMPolicy \
34
- --policy-document file://iam-policy .json || true
32
+ --policy-document file://" $SCRIPT_DIR " /../docs/install/iam_policy .json || true
35
33
36
34
echo " Creating IAM serviceaccount"
37
35
eksctl create iamserviceaccount \
@@ -80,4 +78,8 @@ kubectl delete -k "github.com/aws/eks-charts/stable/aws-load-balancer-controller
80
78
echo " Uncordon windows nodes"
81
79
toggle_windows_scheduling " uncordon"
82
80
81
+ # Need to do this as last step
82
+ echo " Delete IAM Policy"
83
+ aws iam delete-policy --policy-arn arn:aws:iam::$ACCOUNT_ID :policy/AWSLoadBalancerControllerIAMPolicy || true
84
+
83
85
echo " Successfully finished the test suite $(( $SECONDS / 60 )) minutes and $(( $SECONDS % 60 )) seconds"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments