File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed
tests/assets/eks-pod-identity Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 8181 sleep "$SLEEP_TIME"
8282 done
8383
84- PIA_ROLE_PREFIX=$CLUSTER_NAME-pia-role
85- STS_MAX_RETRIES=5
86- STS_RETRY_DELAY=1
87- STS_SUCCESS=0
88-
89- # call sts to check on associated role
90- for ((j=1; j<=STS_MAX_RETRIES; j++)); do
91- ARN=$(aws sts get-caller-identity --query Arn --output text 2>/dev/null)
92- if [[ $? -eq 0 && -n "$ARN" ]]; then
93- if [[ "$ARN" == *"$PIA_ROLE_PREFIX"* ]]; then
94- echo "ARN contains role name prefix '$PIA_ROLE_PREFIX': $ARN"
95- STS_SUCCESS=1
96- break
97- else
98- echo "ARN does not contain expected role name prefix '$PIA_ROLE_PREFIX': $ARN"
99- exit 1
100- fi
101- fi
102- echo "Attempt $i failed to get caller identity. Retrying in $STS_RETRY_DELAY seconds..."
103- sleep $STS_RETRY_DELAY
104- done
105-
106- if [[ $STS_SUCCESS -ne 1 ]]; then
107- echo "Failed to retrieve matching caller identity after $STS_MAX_RETRIES attempts."
108- exit 1
109- fi
110-
11184 # s3 api call
11285 while ! aws s3 ls; do
11386 echo "Waiting for S3 bucket access..."
You can’t perform that action at this time.
0 commit comments