Skip to content

Commit

Permalink
changed aws role creation -2
Browse files Browse the repository at this point in the history
Signed-off-by: vivekr-splunk <[email protected]>
  • Loading branch information
vivekr-splunk committed Oct 3, 2023
1 parent a013696 commit 2fb4656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/deploy-eks-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function createCluster() {
}
]
}" >aws-ebs-csi-driver-trust-policy.json
rolename=$(echo ${TEST_CLUSTER_NAME} | awk -F- '{print "EBS_" $(NF-1) "_" $(NF)}')
rolename=$(echo ${TEST_CLUSTER_NAME} | awk -F- '{print "EBS_" $(NF-1) "_" $(NF-4) "_" $(NF-3) "_" $(NF-2) "_" $(NF)}')
aws iam create-role --role-name ${rolename} --assume-role-policy-document file://aws-ebs-csi-driver-trust-policy.json --description "irsa role for ${TEST_CLUSTER_NAME}"
aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy --role-name ${rolename}
kubectl annotate serviceaccount -n $namespace $service_account eks.amazonaws.com/role-arn=arn:aws:iam::$account_id:role/${rolename}
Expand Down

0 comments on commit 2fb4656

Please sign in to comment.