Skip to content

Commit e28b3ba

Browse files
committed
Remove calls to STS
1 parent 2667c9f commit e28b3ba

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

tests/assets/eks-pod-identity/pod-default.yaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -81,33 +81,6 @@ spec:
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..."

0 commit comments

Comments
 (0)