Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7519b07
REVERSE disable tests
thomasferrandiz Aug 20, 2025
2037607
WIP initial commit of multus test
thomasferrandiz Aug 20, 2025
91a7704
REVERSE disable tests
thomasferrandiz Aug 20, 2025
16c6a02
remove node_ip4_public
thomasferrandiz Aug 20, 2025
0447fae
add multus deployment
thomasferrandiz Aug 20, 2025
6d2b898
fix file path
thomasferrandiz Aug 20, 2025
758d573
fix path again
thomasferrandiz Aug 20, 2025
24529ec
fix typo
thomasferrandiz Aug 21, 2025
048ce23
use shell to copy manifest
thomasferrandiz Aug 21, 2025
0ab3eda
add network attach and client
thomasferrandiz Aug 21, 2025
dd4983b
check that Multus IP is present
thomasferrandiz Aug 22, 2025
36f566e
update multus pod client
thomasferrandiz Aug 22, 2025
052f905
unmarshal network status in code
thomasferrandiz Aug 25, 2025
a1cf705
fix multus command
thomasferrandiz Aug 25, 2025
8223831
fix json decoding
thomasferrandiz Aug 25, 2025
42e8bf3
fix printf
thomasferrandiz Aug 25, 2025
6336982
add ping test
thomasferrandiz Aug 25, 2025
7944c23
fix public network
thomasferrandiz Aug 25, 2025
7c5b8a8
fix public netowrk syntax
thomasferrandiz Aug 25, 2025
f3d22b4
ping between nodes
thomasferrandiz Aug 26, 2025
838bdcf
debug
thomasferrandiz Aug 26, 2025
9596124
debug ping
thomasferrandiz Aug 26, 2025
ffab432
add some tests
thomasferrandiz Aug 26, 2025
7fbb6bf
add get pods
thomasferrandiz Aug 26, 2025
e102cda
don;t stop on some error
thomasferrandiz Aug 27, 2025
0db976e
add curl test
thomasferrandiz Aug 27, 2025
cb53800
make pod ping themselves
thomasferrandiz Aug 28, 2025
730418e
Revert "REVERSE disable tests"
thomasferrandiz Aug 28, 2025
0bd8354
Revert "REVERSE disable tests"
thomasferrandiz Aug 28, 2025
2b808b8
REVERT disable tests
thomasferrandiz Aug 28, 2025
580dfd6
REVERT disable drone
thomasferrandiz Aug 28, 2025
11534ef
Use private network for multus
thomasferrandiz Sep 2, 2025
d372d0e
make pod ping each other
thomasferrandiz Sep 2, 2025
4e0720f
ping before curl
thomasferrandiz Sep 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
571 changes: 0 additions & 571 deletions .drone.yml

This file was deleted.

103 changes: 3 additions & 100 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ jobs:
strategy:
fail-fast: false
matrix:
etest: [btrfs, embeddedmirror, externalip, privateregistry, rootless, s3, startup, wasm]
# etest: [btrfs, embeddedmirror, externalip, privateregistry, rootless, s3, startup, wasm]
etest: [ multus ]
max-parallel: 5
steps:
- name: "Checkout"
Expand Down Expand Up @@ -116,102 +117,4 @@ jobs:
flags: e2etests # optional
verbose: true # optional (default = false)

build-go-tests:
name: "Build Go Tests"
strategy:
matrix:
arch: [amd64, arm64]
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
outputs:
channel: ${{ steps.channel_step.outputs.channel }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Go
uses: ./.github/actions/setup-go
- name: Build Go Tests
run: |
mkdir -p ./dist/artifacts
go test -c -ldflags="-w -s" -o ./dist/artifacts ./tests/docker/...
- name: Upload Go Tests
uses: actions/upload-artifact@v4
with:
name: docker-go-tests-${{ matrix.arch }}
path: ./dist/artifacts/*.test
compression-level: 9
retention-days: 1
# For upgrade and skew tests, we need to know the channel this run is based off.
# Since this is predetermined, we can run this step before the actual test job, saving time.
- name: Determine channel
id: channel_step
run: |
. ./scripts/version.sh
MINOR_VER=$(echo $VERSION_TAG | cut -d'.' -f1,2)
echo "CHANNEL=$MINOR_VER" >> $GITHUB_OUTPUT
# channel name should be v1.XX or latest
- name: Fail if channel name does not match pattern
run: |
if [[ ! ${{ steps.channel_step.outputs.channel }} =~ ^v1\.[0-9]+$|latest$ ]]; then
echo "Channel name ${{ steps.channel_step.outputs.channel }} does not match pattern"
exit 1
fi

docker-go:
needs: [build, build-arm64, build-go-tests]
name: Docker
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
dtest: [autoimport, basics, bootstraptoken, cacerts, etcd, hardened, lazypull, skew, secretsencryption, snapshotrestore, svcpoliciesandfirewall, token, upgrade]
arch: [amd64, arm64]
exclude:
- dtest: autoimport
arch: arm64
- dtest: secretsencryption
arch: arm64
- dtest: snapshotrestore
arch: arm64
- dtest: svcpoliciesandfirewall
arch: arm64
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
env:
CHANNEL: ${{ needs.build-go-tests.outputs.channel }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: "Download K3s image"
uses: actions/download-artifact@v5
with:
name: k3s-${{ matrix.arch }}
path: ./dist/artifacts
- name: Load and set K3s image
run: |
if [ ${{ matrix.arch }} = "arm64" ]; then
mv ./dist/artifacts/k3s-arm64 ./dist/artifacts/k3s
fi
chmod +x ./dist/artifacts/k3s
docker image load -i ./dist/artifacts/k3s-image.tar
IMAGE_TAG=$(docker image ls --format '{{.Repository}}:{{.Tag}}' | grep 'rancher/k3s')
echo "K3S_IMAGE=$IMAGE_TAG" >> $GITHUB_ENV
- name: Download Go Tests
uses: actions/download-artifact@v5
with:
name: docker-go-tests-${{ matrix.arch }}
path: ./dist/artifacts
- name: Run ${{ matrix.dtest }} Test
# Put the compiled test binary back in the same place as the test source
run: |
chmod +x ./dist/artifacts/${{ matrix.dtest }}.test
mv ./dist/artifacts/${{ matrix.dtest }}.test ./tests/docker/${{ matrix.dtest }}/
cd ./tests/docker/${{ matrix.dtest }}

# These tests use rancher/systemd-node and have different flags.
CI_TESTS="autoimport hardened secretsencryption snapshotrestore svcpoliciesandfirewall token"
if [ ${{ matrix.dtest }} = "upgrade" ] || [ ${{ matrix.dtest }} = "skew" ]; then
./${{ matrix.dtest }}.test -test.timeout=0 -test.v -ginkgo.v -k3sImage=$K3S_IMAGE -channel=$CHANNEL
elif [[ $CI_TESTS =~ ${{ matrix.dtest }} ]]; then
./${{ matrix.dtest }}.test -test.timeout=0 -test.v -ginkgo.v -ci
else
./${{ matrix.dtest }}.test -test.timeout=0 -test.v -ginkgo.v -k3sImage=$K3S_IMAGE
fi

128 changes: 0 additions & 128 deletions .github/workflows/integration.yaml

This file was deleted.

89 changes: 0 additions & 89 deletions .github/workflows/unitcoverage.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions tests/e2e/amd64_resource_files/multus_network_attach.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-whereabouts
spec:
config: |-
{
"cniVersion": "1.0.0",
"type": "macvlan",
"master": "eth2",
"mode": "bridge",
"ipam": {
"type": "whereabouts",
"range": "172.17.0.0/24",
"gateway": "172.17.0.1",
"configuration_path": "/var/lib/rancher/k3s/agent/etc/cni/net.d/whereabouts.d/whereabouts.conf"
}
}
42 changes: 42 additions & 0 deletions tests/e2e/amd64_resource_files/multus_pod_client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: multus-demo
labels:
app: multus-demo
spec:
replicas: 2
selector:
matchLabels:
app: multus-demo
template:
metadata:
annotations:
k8s.v1.cni.cncf.io/networks: macvlan-whereabouts
labels:
app: multus-demo
spec:
containers:
- image: wbitt/network-multitool:extra
imagePullPolicy: Always
name: network-multitool
env:
- name: HTTP_PORT
value: "1180"
- name: HTTPS_PORT
value: "11443"
ports:
- containerPort: 1180
name: http-port
- containerPort: 11443
name: https-port
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- multus-demo
topologyKey: kubernetes.io/hostname
Loading
Loading