forked from l7mp/stunner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'l7mp:main' into staging
- Loading branch information
Showing
199 changed files
with
34,035 additions
and
6,783 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve STUNner | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Description | ||
|
||
[Description of the problem] | ||
|
||
### Steps to Reproduce | ||
|
||
[Brief description of the steps you took to encounter the problem, if applicable] | ||
|
||
**Expected behavior:** [What you expected to happen] | ||
|
||
**Actual behavior:** [What actually happened] | ||
|
||
### Versions | ||
|
||
[Which version of STUNner you are using] | ||
|
||
### Info | ||
|
||
[Please copy-paste the output of the below commands and make sure to remove all sensitive information, like usernames, passwords, IP addresses, etc.] | ||
|
||
#### Gateway API status | ||
|
||
[Output of `kubectl get gateways,gatewayconfigs,gatewayclasses,udproutes.stunner.l7mp.io --all-namespaces -o yaml`] | ||
|
||
#### Operator logs | ||
|
||
[Output of `kubectl -n stunner-system logs $(kubectl get pods -l control-plane=stunner-gateway-operator-controller-manager --all-namespaces -o jsonpath='{.items[0].metadata.name}')`] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: "publish: Add binaries to release assets" | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
add_binaries: | ||
name: Add binaries to release assets | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- os: linux | ||
arch: amd64 | ||
file_end: "" | ||
- os: linux | ||
arch: arm64 | ||
file_end: "" | ||
|
||
- os: darwin | ||
arch: amd64 | ||
file_end: "" | ||
- os: darwin | ||
arch: arm64 | ||
file_end: "" | ||
|
||
- os: windows | ||
arch: amd64 | ||
file_end: ".exe" | ||
- os: windows | ||
arch: arm64 | ||
file_end: ".exe" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get version | ||
id: vars | ||
run: echo tag=$(echo ${GITHUB_REF:11}) >> $GITHUB_OUTPUT | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
|
||
- name: Build binaries | ||
run: | | ||
export CGO_ENABLED=0 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} | ||
make build-bin | ||
mv bin/turncat turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }} | ||
mv bin/stunnerctl stunnerctl-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }} | ||
- name: Release turncat binary | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }} | ||
tag: ${{ github.ref_name }} | ||
asset_name: turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }} | ||
|
||
- name: Release stunnerctl binary | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: stunnerctl-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }} | ||
tag: ${{ github.ref_name }} | ||
asset_name: stunnerctl-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "publish: Push Helm charts to web" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
dev: | ||
description: Whether to release a dev version | ||
required: true | ||
type: boolean | ||
|
||
jobs: | ||
push_charts: | ||
name: Push Helm charts to web | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get version for non-dev release | ||
if: ${{ inputs.dev == false || inputs.dev == 'false' }} | ||
id: vars | ||
run: echo tag=$(echo ${GITHUB_REF:11}) >> $GITHUB_OUTPUT | ||
|
||
- name: Trigger release workflow in the stunner-helm repo | ||
if: ${{ inputs.dev == false || inputs.dev == 'false' }} | ||
uses: convictional/[email protected] | ||
with: | ||
github_token: ${{ secrets.WEB_PAT_TOKEN }} | ||
owner: l7mp | ||
repo: stunner-helm | ||
client_payload: '{"tag": "${{ steps.vars.outputs.tag }}", "type": "stunner"}' | ||
workflow_file_name: publish.yaml | ||
|
||
- name: Trigger release workflow in the stunner-helm repo | ||
if: ${{ inputs.dev == true || inputs.dev == 'true' }} | ||
uses: convictional/[email protected] | ||
with: | ||
github_token: ${{ secrets.WEB_PAT_TOKEN }} | ||
owner: l7mp | ||
repo: stunner-helm | ||
client_payload: '{"tag": "dev", "type": "stunner"}' | ||
workflow_file_name: publish.yaml |
Oops, something went wrong.