Skip to content

Commit

Permalink
matrix test for legacy/nft
Browse files Browse the repository at this point in the history
  • Loading branch information
alpeb committed Mar 14, 2024
1 parent 2f96a2f commit 94489ef
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 27 deletions.
29 changes: 8 additions & 21 deletions .github/workflows/cni-plugin-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,20 @@ on:
- justfile*

jobs:
cni-flannel-test:
continue-on-error: true
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v43
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Run CNI integration tests
run: just cni-plugin-test-integration-flannel
cni-calico-test:
continue-on-error: true
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v43
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Run CNI integration tests
run: just cni-plugin-test-integration-calico
cni-cilium-test:
continue-on-error: true
cni-test:
strategy:
matrix:
cni: [flannel, calico, cilium]
iptables-mode: [legacy, nft]
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: linkerd/dev/actions/setup-tools@v43
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Run CNI integration tests
run: just cni-plugin-test-integration-cilium
env:
IPTABLES_MODE: ${{ matrix.iptables-mode }}
run: just cni-plugin-test-integration-${{ matrix.cni }}
ordering-test:
continue-on-error: true
timeout-minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion cni-plugin/integration/manifests/calico/linkerd-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ data:
"inbound-ports-to-ignore": ["4191","4190"],
"simulate": false,
"use-wait-flag": false,
"iptables-mode": "legacy",
"iptables-mode": "$IPTABLES_MODE",
"ipv6": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion cni-plugin/integration/manifests/cilium/linkerd-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ data:
"inbound-ports-to-ignore": ["4191","4190"],
"simulate": false,
"use-wait-flag": false,
"iptables-mode": "legacy",
"iptables-mode": "$IPTABLES_MODE",
"ipv6": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion cni-plugin/integration/manifests/flannel/linkerd-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ data:
"inbound-ports-to-ignore": ["4191","4190"],
"simulate": false,
"use-wait-flag": false,
"iptables-mode": "legacy",
"iptables-mode": "$IPTABLES_MODE",
"ipv6": true
}
}
Expand Down
8 changes: 5 additions & 3 deletions cni-plugin/integration/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ set -euxo pipefail

cd "${BASH_SOURCE[0]%/*}"

# Integration tests to run. Scenario is passed in as an environment variable.
# Default is 'flannel'
SCENARIO=${CNI_TEST_SCENARIO:-flannel}
IPTABLES_MODE=${IPTABLES_MODE:-legacy}

# Run kubectl with the correct context.
function k() {
Expand All @@ -25,7 +24,10 @@ function create_test_lab() {
# can enable a testing matrix?
# Apply all files in scenario directory. For non-flannel CNIs, this will
# include the CNI manifest itself.
k apply -f "manifests/$SCENARIO/"
for f in ./manifests/"$SCENARIO"/*.yaml
do
envsubst < "$f" | k apply -f -
done
}

function cleanup() {
Expand Down

0 comments on commit 94489ef

Please sign in to comment.