Skip to content

Commit 360ce56

Browse files
committed
Fix role deletion & change to use p99.9 for Pod Identity latency
1 parent 27a3144 commit 360ce56

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

tests/tekton-resources/pipelines/eks/awscli-cl2-load-with-addons-slos.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ spec:
3535
- name: desired-nodes
3636
type: string
3737
- name: pods-per-node
38+
default: "50"
3839
type: string
3940
- name: nodes-per-namespace
4041
type: string
@@ -77,13 +78,13 @@ spec:
7778
- name: pia-test-pod-spec-url
7879
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/pod-default.yaml"
7980
- name: cl2-eks-pod-identity-pods
80-
default: "5000"
81+
default: "10000"
8182
- name: cl2-default-qps
82-
default: "100"
83+
default: "300"
8384
- name: cl2-default-burst
84-
default: "200"
85+
default: "300"
8586
- name: cl2-uniform-qps
86-
default: "100"
87+
default: "300"
8788
- name: cl2-metric-dimension-name
8889
description: "default metric dimension name"
8990
default: "ClusterName"
@@ -97,7 +98,7 @@ spec:
9798
description: "default metric period"
9899
default: "300"
99100
- name: timeout-pia-pod-creation
100-
default: "80s"
101+
default: "90s"
101102
- name: timeout-pia-pod-startup
102103
default: "60s"
103104
- name: launch-template-ami

tests/tekton-resources/tasks/generators/clusterloader/load-pod-identity.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,13 @@ spec:
228228
--start-time "$START_TIME" \
229229
--end-time "$END_TIME" \
230230
--period "$PERIOD" \
231-
--extended-statistics p50 p99 p99.95 \
231+
--extended-statistics p99 p99.9 p99.95 \
232232
--output json)
233233
234-
# extract p50 p99 p99.95 of credential fetching
234+
# extract p99 p99.9 p99.95 of credential fetching
235235
latest=$(echo "$response" | jq -r '.Datapoints | sort_by(.Timestamp) | last')
236-
p50=$(echo "$latest" | jq -r '."ExtendedStatistics"."p50" // "N/A"')
237236
p99=$(echo "$latest" | jq -r '."ExtendedStatistics"."p99" // "N/A"')
237+
p999=$(echo "$latest" | jq -r '."ExtendedStatistics"."p99.9" // "N/A"')
238238
p9995=$(echo "$latest" | jq -r '."ExtendedStatistics"."p99.95" // "N/A"')
239239
240240
response=$(aws cloudwatch get-metric-statistics \
@@ -258,8 +258,8 @@ spec:
258258
"end_time": "$END_TIME",
259259
"total_samples": $total_samples,
260260
"rate": $rate,
261-
"p50": $p50,
262261
"p99": $p99,
262+
"p99.9": $p999,
263263
"p99.95": $p9995
264264
}
265265
EOF
@@ -268,10 +268,10 @@ spec:
268268
ls -larth
269269
aws s3 cp . s3://$S3_RESULT_PATH/ --recursive
270270
271-
# if p99.95 is equal to or more than 1 second, exit with failure
272-
int_p9995=$(echo "$p9995" | awk '{printf "%d", $1}')
273-
echo "p99.95 is $p9995"
274-
if [ "$int_p9995" -lt 1 ]; then
271+
# if p99.9 is equal to or more than 1 second, exit with failure
272+
int_p999=$(echo "$p999" | awk '{printf "%d", $1}')
273+
echo "p99.9 is $p999"
274+
if [ "$int_p999" -lt 1 ]; then
275275
echo "1" | tee $(results.datapoint.path)
276276
else
277277
echo "0" | tee $(results.datapoint.path)

tests/tekton-resources/tasks/teardown/awscli-eks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ spec:
5353
if [ "$PIA_ROLE_EXISTS" == "$PIA_ROLE_NAME" ]; then
5454
# Detach all attached managed policies
5555
aws iam list-attached-role-policies --role-name "$PIA_ROLE_NAME" \
56-
--query 'AttachedPolicies[*].PolicyArn' --output text | while read -r policy_arn; do
56+
--query 'AttachedPolicies[*].PolicyArn' --output json | jq -r '.[]' | while read -r policy_arn; do
5757
echo "Detaching managed policy: $policy_arn"
5858
aws iam detach-role-policy --role-name "$PIA_ROLE_NAME" --policy-arn "$policy_arn"
5959
done
6060
# Delete all inline policies
6161
aws iam list-role-policies --role-name "$PIA_ROLE_NAME" \
62-
--query 'PolicyNames' --output text | while read -r policy_name; do
62+
--query 'PolicyNames' --output json | jq -r '.[]' | while read -r policy_name; do
6363
echo "Deleting inline policy: $policy_name"
6464
aws iam delete-role-policy --role-name "$PIA_ROLE_NAME" --policy-name "$policy_name"
6565
done

0 commit comments

Comments
 (0)