Skip to content

Commit 30274a3

Browse files
committed
fix webhook timing
1 parent 4c7a525 commit 30274a3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

k8s-tests/chainsaw/helm/helm-webhook-test/chainsaw-test.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ spec:
3333
../install-helm-chart.sh webhooks
3434
- assert:
3535
file: assert-scheduled.yaml
36+
- script:
37+
content: |
38+
## Wait for webhook to be ready (K8s 1.34 needs extra time)
39+
echo "Waiting for webhook to be callable..."
40+
i=1
41+
while [ $i -le 60 ]; do
42+
if kubectl apply -f invalid-skyhook.yaml 2>&1 | grep -q "admission webhook"; then
43+
echo "✓ Webhook is ready"
44+
break
45+
fi
46+
if [ $i -eq 60 ]; then
47+
echo "ERROR: Webhook did not become ready in 60 seconds"
48+
exit 1
49+
fi
50+
sleep 1
51+
i=$((i + 1))
52+
done
3653
- script:
3754
content: |
3855
## Create invalid skyhook

0 commit comments

Comments
 (0)