-
-
Notifications
You must be signed in to change notification settings - Fork 56
97 lines (81 loc) · 3.27 KB
/
e2e-test-dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Run End-to-End Test (dev)
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 1'
jobs:
e2e_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Download modules
run: go mod download
- name: Go install
run: go install
- name: Build turncat
run: CGO_ENABLED=0 go build -ldflags="-w -s" -o turncat cmd/turncat/main.go
- name: Start minikube
uses: medyagh/setup-minikube@master
with:
driver: docker
container-runtime: containerd
wait: all
cpus: max
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-dev --create-namespace --namespace=stunner --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
echo "* wait for the deployment"
kubectl get all -A
kubectl wait -n stunner --for=condition=Available deployment udp-gateway --timeout 5m
echo "* EVERYTHING UP"
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