Skip to content

Run End-to-End Test (stable) #224

Run End-to-End Test (stable)

Run End-to-End Test (stable) #224

name: Run End-to-End Test (stable)
on:
workflow_dispatch:
schedule:
- cron: '0 11 1-7,15-21 * 2'
jobs:
e2e_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install turncat
run: |
URL=`wget -q -O - https://api.github.com/repos/l7mp/stunner/releases/latest | jq -r '.assets[] | select(.name | contains ("turncat")) | select(.name | contains ("linux")) | select(.name | contains ("amd64")) | .browser_download_url'`
wget $URL -O turncat
chmod a+x turncat
- name: Start minikube
uses: medyagh/setup-minikube@master
with:
driver: docker
container-runtime: containerd
wait: all
cache: false
- name: Start minikube tunnel
run: minikube tunnel &>mktunnel.log &
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.16.2
- name: Install STUNner
run: |
helm repo add stunner https://l7mp.io/stunner
helm repo update
helm install stunner-gateway-operator stunner/stunner-gateway-operator --create-namespace --namespace=stunner --set stunnerGatewayOperator.dataplane.mode=managed --set stunnerGatewayOperator.deployment.container.manager.resources.requests.cpu=200m --set stunnerGatewayOperator.dataplane.spec.resources.requests.cpu=100m
- name: Deploy iperf server
run: kubectl apply -f docs/examples/simple-tunnel/iperf-server.yaml
- name: Configure STUNner
run: |
kubectl apply -f docs/examples/simple-tunnel/iperf-stunner.yaml
sleep 75
- name: Install iperf client
run: |
sudo apt-get update
sudo apt-get -y install iperf
- name: Wait for LoadBalancer IP
run: |
for n in {1..60}; do [[ ! -z $(kubectl get svc udp-gateway -n stunner -o jsonpath="{.status.loadBalancer.ingress[0].ip}") ]] && break; echo "Waiting for LoadBalancer IP"; sleep 2; done
kubectl wait -n stunner --for=condition=Available deployment udp-gateway --timeout 5m
kubectl get all -A
- name: Start turncat
run: |
./turncat --log=all:INFO udp://127.0.0.1:5000 k8s://stunner/udp-gateway:udp-listener udp://$(kubectl get svc iperf-server -o jsonpath="{.spec.clusterIP}"):5001 &>turncat.log &
sleep 1
- name: Run iperf client
run: |
iperf -c 127.0.0.1 -p 5000 -u -l 100 -b 5M -t 5 | tee iperf.log
- name: Show logs
run: |
echo "* IPERF"
echo "** Client"
cat iperf.log
echo "** Server"
kubectl logs $(kubectl get pods -l app=iperf-server -o jsonpath='{.items[0].metadata.name}')
echo "* MINIKUBE TUNNEL"
cat mktunnel.log
echo "* TURNCAT"
cat turncat.log
echo "* STUNNER"
kubectl logs -n stunner $(kubectl get pods -n stunner -l app=stunner -o jsonpath='{.items[0].metadata.name}')
echo "* STUNNER-GATEWAY=OPERATOR"
kubectl logs -n stunner $(kubectl get pods -n stunner -l control-plane=stunner-gateway-operator-controller-manager -o jsonpath='{.items[0].metadata.name}')
- name: Check iperf conectivity
run: grep "Server Report" iperf.log