24 lines
682 B
Bash
24 lines
682 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Port-forward router to localhost:8888
|
|
kubectl port-forward svc/router 8888:80 -n fission &>/tmp/pf.log &
|
|
PF_PID=$!
|
|
trap "kill $PF_PID 2>/dev/null" EXIT
|
|
sleep 3
|
|
|
|
ROUTER="localhost:8888"
|
|
echo "Router via port-forward: $ROUTER"
|
|
echo ""
|
|
|
|
echo "=== [1/3] local-path ==="
|
|
curl -sf --max-time 30 "http://$ROUTER/check/local" | python3 -m json.tool || echo "ERROR: no response"
|
|
|
|
echo ""
|
|
echo "=== [2/3] vcd-disk-ext4 ==="
|
|
curl -sf --max-time 30 "http://$ROUTER/check/vcd" | python3 -m json.tool || echo "ERROR: no response"
|
|
|
|
echo ""
|
|
echo "=== [3/3] S3 (ngcloud) ==="
|
|
curl -sf --max-time 30 "http://$ROUTER/check/s3" | python3 -m json.tool || echo "ERROR: no response"
|