Skip to content

Commit 406c96f

Browse files
author
Chinmay Gadgil
committed
Renamed run-prow-test
Deleted duplicate file run-e2e-test.sh Updated create-iam-policy logic
1 parent 3a9a117 commit 406c96f

File tree

2 files changed

+5
-101
lines changed

2 files changed

+5
-101
lines changed

scripts/run-prow-test.sh renamed to scripts/run-e2e-test.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ eksctl utils associate-iam-oidc-provider \
2727
--approve
2828

2929
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-
3230
aws iam create-policy \
3331
--policy-name AWSLoadBalancerControllerIAMPolicy \
34-
--policy-document file://iam-policy.json || true
32+
--policy-document file://"$SCRIPT_DIR"/../docs/install/iam_policy.json || true
3533

3634
echo "Creating IAM serviceaccount"
3735
eksctl create iamserviceaccount \
@@ -80,4 +78,8 @@ kubectl delete -k "github.com/aws/eks-charts/stable/aws-load-balancer-controller
8078
echo "Uncordon windows nodes"
8179
toggle_windows_scheduling "uncordon"
8280

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+
8385
echo "Successfully finished the test suite $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds"

test/e2e/run-e2e-test.sh

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)