Skip to content

Commit 67322f5

Browse files
committed
fix: increase KEDA CloudWatch wait to 300s, make karpenter suite hook retry pod readiness
1 parent d59facb commit 67322f5

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

website/docs/fastpaths/developer/keda/test-keda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The command below will run the load generator with:
1111
- Sending 5 queries per second each
1212
- Running for a maximum of 10 minutes
1313

14-
```bash hook=keda-pod-scaleout hookTimeout=660 wait=120
14+
```bash hook=keda-pod-scaleout hookTimeout=660 wait=300
1515
$ export ALB_HOSTNAME=$(kubectl get ingress ui-auto -n ui -o yaml | yq .status.loadBalancer.ingress[0].hostname)
1616
$ kubectl run load-generator \
1717
--image=williamyeh/hey:latest \

website/docs/fastpaths/operator/karpenter/tests/hook-suite.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@ after() {
99
kubectl delete deployment inflate -n other --ignore-not-found
1010

1111
# Wait for Karpenter consolidation to settle and pods to stabilize
12+
# Retry the wait since pods may be evicted during consolidation
1213
sleep 120
13-
kubectl wait --for=condition=Ready --timeout=300s pods -l app.kubernetes.io/created-by=eks-workshop -A
14+
for i in $(seq 1 3); do
15+
if kubectl wait --for=condition=Ready --timeout=120s pods -l app.kubernetes.io/created-by=eks-workshop -A 2>/dev/null; then
16+
echo "All pods ready"
17+
return 0
18+
fi
19+
echo "Attempt $i: some pods not ready, waiting for consolidation..."
20+
sleep 30
21+
done
22+
# Final attempt without error suppression
23+
kubectl wait --for=condition=Ready --timeout=120s pods -l app.kubernetes.io/created-by=eks-workshop -A
1424
}
1525

1626
"$@"

0 commit comments

Comments
 (0)