fix(e2e): run LB check curl from testing environment
Run curl directly from the testing container instead of creating a separate pod with kubectl run. This avoids PodSecurity policy violations and simplifies the test execution. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
parent
5638a7eae9
commit
dd0bbd375f
1 changed files with 9 additions and 13 deletions
|
|
@ -202,20 +202,16 @@ if [ -z "$LB_ADDR" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
kubectl run -n tenant-test lb-check-${test_name} \
|
||||
--rm -i --restart=Never \
|
||||
--image=curlimages/curl \
|
||||
--timeout=60s \
|
||||
--command -- \
|
||||
sh -c "
|
||||
for i in \$(seq 1 20); do
|
||||
echo \"Attempt \$i\";
|
||||
curl -sf http://${LB_ADDR} && exit 0;
|
||||
sleep 3;
|
||||
done;
|
||||
echo 'LoadBalancer not reachable';
|
||||
for i in $(seq 1 20); do
|
||||
echo "Attempt $i"
|
||||
curl --silent --fail "http://${LB_ADDR}" && break
|
||||
sleep 3
|
||||
done
|
||||
|
||||
if [ "$i" -eq 20 ]; then
|
||||
echo "LoadBalancer not reachable" >&2
|
||||
exit 1
|
||||
"
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
kubectl delete deployment --kubeconfig tenantkubeconfig-${test_name} "${test_name}-backend" -n tenant-test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue