Conformance E2E (ci-e2e) #18180
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
name: Conformance E2E (ci-e2e) | |
# Any change in triggers needs to be reflected in the concurrency group. | |
on: | |
workflow_dispatch: | |
inputs: | |
PR-number: | |
description: "Pull request number." | |
required: true | |
context-ref: | |
description: "Context in which the workflow runs. If PR is from a fork, will be the PR target branch (general case). If PR is NOT from a fork, will be the PR branch itself (this allows committers to test changes to workflows directly from PRs)." | |
required: true | |
SHA: | |
description: "SHA under test (head of the PR branch)." | |
required: true | |
extra-args: | |
description: "[JSON object] Arbitrary arguments passed from the trigger comment via regex capture group. Parse with 'fromJson(inputs.extra-args).argName' in workflow." | |
required: false | |
default: '{}' | |
# Run once a day | |
schedule: | |
- cron: '0 10 * * *' | |
# By specifying the access of one of the scopes, all of those that are not | |
# specified are set to 'none'. | |
permissions: | |
# To be able to access the repository with actions/checkout | |
contents: read | |
# To allow retrieving information from the PR API | |
pull-requests: read | |
# To be able to set commit status | |
statuses: write | |
concurrency: | |
# Structure: | |
# - Workflow name | |
# - Event type | |
# - A unique identifier depending on event type: | |
# - schedule: SHA | |
# - workflow_dispatch: PR number | |
# | |
# This structure ensures a unique concurrency group name is generated for each | |
# type of testing, such that re-runs will cancel the previous run. | |
group: | | |
${{ github.workflow }} | |
${{ github.event_name }} | |
${{ | |
(github.event_name == 'schedule' && github.sha) || | |
(github.event_name == 'workflow_dispatch' && github.event.inputs.PR-number) | |
}} | |
cancel-in-progress: true | |
env: | |
# renovate: datasource=github-releases depName=cilium/cilium-cli | |
cilium_cli_version: v0.15.23 | |
cilium_cli_ci_version: | |
jobs: | |
commit-status-start: | |
name: Commit Status Start | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set initial commit status | |
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1 | |
with: | |
sha: ${{ inputs.SHA || github.sha }} | |
setup-and-test: | |
runs-on: ubuntu-latest-4cores-16gb | |
name: 'Setup & Test' | |
env: | |
job_name: "Setup & Test" | |
strategy: | |
fail-fast: false | |
max-parallel: 16 | |
matrix: | |
include: | |
# See https://github.com/cilium/cilium/issues/20606 for configuration table | |
- name: '1' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '4.19-20240417.104652' | |
kube-proxy: 'iptables' | |
kpr: 'disabled' | |
tunnel: 'vxlan' | |
- name: '2' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.4-20240417.104652' | |
kube-proxy: 'iptables' | |
kpr: 'disabled' | |
tunnel: 'disabled' | |
- name: '3' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.10-20240417.104652' | |
kube-proxy: 'iptables' | |
kpr: 'disabled' | |
tunnel: 'disabled' | |
endpoint-routes: 'true' | |
- name: '4' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.10-20240417.104652' | |
kube-proxy: 'iptables' | |
kpr: 'strict' | |
tunnel: 'vxlan' | |
lb-mode: 'snat' | |
endpoint-routes: 'true' | |
egress-gateway: 'true' | |
- name: '5' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.15-20240417.104652' | |
kube-proxy: 'iptables' | |
kpr: 'strict' | |
tunnel: 'disabled' | |
lb-mode: 'dsr' | |
endpoint-routes: 'true' | |
egress-gateway: 'true' | |
host-fw: 'true' | |
- name: '6' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.1-20240417.104652' | |
kube-proxy: 'none' | |
kpr: 'strict' | |
tunnel: 'vxlan' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
host-fw: 'true' | |
lb-acceleration: 'testing-only' | |
- name: '7' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20240417.104652' | |
kube-proxy: 'none' | |
kpr: 'strict' | |
tunnel: 'disabled' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
lb-acceleration: 'testing-only' | |
- name: '8' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20240417.104652' | |
kube-proxy: 'iptables' | |
kpr: 'disabled' | |
tunnel: 'geneve' | |
endpoint-routes: 'true' | |
- name: '9' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.10-20240417.104652' | |
kube-proxy: 'iptables' | |
kpr: 'strict' | |
tunnel: 'vxlan' | |
encryption: 'wireguard' | |
encryption-node: 'false' | |
lb-mode: 'snat' | |
endpoint-routes: 'true' | |
egress-gateway: 'true' | |
- name: '10' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.15-20240417.104652' | |
kube-proxy: 'iptables' | |
kpr: 'strict' | |
tunnel: 'disabled' | |
encryption: 'wireguard' | |
encryption-node: 'false' | |
lb-mode: 'dsr' | |
endpoint-routes: 'true' | |
egress-gateway: 'true' | |
- name: '11' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.1-20240417.104652' | |
kube-proxy: 'none' | |
kpr: 'strict' | |
tunnel: 'vxlan' | |
encryption: 'wireguard' | |
encryption-node: 'true' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
- name: '12' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20240417.104652' | |
kube-proxy: 'none' | |
kpr: 'strict' | |
tunnel: 'disabled' | |
encryption: 'wireguard' | |
encryption-node: 'true' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout context ref (trusted) | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
ref: ${{ inputs.context-ref || github.sha }} | |
persist-credentials: false | |
- name: Set Environment Variables | |
uses: ./.github/actions/set-env-variables | |
- name: Set up job variables | |
id: vars | |
run: | | |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
SHA="${{ inputs.SHA }}" | |
else | |
SHA="${{ github.sha }}" | |
fi | |
echo sha=${SHA} >> $GITHUB_OUTPUT | |
- name: Derive Cilium installation config | |
id: cilium-config | |
uses: ./.github/actions/cilium-config | |
with: | |
image-tag: ${{ steps.vars.outputs.sha }} | |
chart-dir: './untrusted/install/kubernetes/cilium' | |
tunnel: ${{ matrix.tunnel }} | |
endpoint-routes: ${{ matrix.endpoint-routes }} | |
ipv6: ${{ matrix.ipv6 }} | |
kpr: ${{ matrix.kpr }} | |
lb-mode: ${{ matrix.lb-mode }} | |
lb-acceleration: ${{ matrix.lb-acceleration }} | |
encryption: ${{ matrix.encryption }} | |
encryption-node: ${{ matrix.encryption-node }} | |
egress-gateway: ${{ matrix.egress-gateway }} | |
host-fw: ${{ matrix.host-fw }} | |
- name: Install Cilium CLI | |
uses: cilium/cilium-cli@5362f383942260c0aed4f3876e09c3452435577a # v0.14.8 | |
with: | |
release-version: ${{ env.cilium_cli_version }} | |
ci-version: ${{ env.cilium_cli_ci_version }} | |
binary-name: cilium-cli | |
binary-dir: ./ | |
- name: Set Kind params | |
id: kind-params | |
shell: bash | |
run: | | |
IP_FAM="dual" | |
if [ "${{ matrix.ipv6 }}" == "false" ]; then | |
IP_FAM="ipv4" | |
fi | |
echo params="--xdp --secondary-network \"\" 3 \"\" \"\" ${{ matrix.kube-proxy }} $IP_FAM" >> $GITHUB_OUTPUT | |
- name: Provision K8s on LVH VM | |
uses: ./.github/actions/lvh-kind | |
with: | |
test-name: e2e-conformance | |
kernel: ${{ matrix.kernel }} | |
kind-params: "${{ steps.kind-params.outputs.params }}" | |
kind-image: ${{ env.KIND_K8S_IMAGE }} | |
# Warning: since this is a privileged workflow, subsequent workflow job | |
# steps must take care not to execute untrusted code. | |
- name: Checkout pull request branch (NOT TRUSTED) | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
with: | |
ref: ${{ steps.vars.outputs.sha }} | |
persist-credentials: false | |
path: untrusted | |
sparse-checkout: | | |
install/kubernetes/cilium | |
- name: Wait for images to be available | |
timeout-minutes: 30 | |
shell: bash | |
run: | | |
for image in cilium-ci operator-generic-ci hubble-relay-ci ; do | |
until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done | |
done | |
- name: Install Cilium | |
shell: bash | |
run: | | |
kubectl patch node kind-worker3 --type=json -p='[{"op":"add","path":"/metadata/labels/cilium.io~1no-schedule","value":"true"}]' | |
export CILIUM_CLI_MODE=helm | |
./cilium-cli install ${{ steps.cilium-config.outputs.config }} | |
./cilium-cli status --wait | |
kubectl get pods --all-namespaces -o wide | |
kubectl -n kube-system exec daemonset/cilium -- cilium status | |
mkdir -p cilium-junits | |
- name: Run tests | |
shell: bash | |
run: | | |
EXTRA=() | |
if [ "${{ matrix.secondary-network }}" = "true" ]; then | |
EXTRA+=("--secondary-network-iface=eth1") | |
fi | |
if [ "${{ matrix.host-fw }}" == "true" ]; then | |
# Missed tail calls until https://github.com/cilium/cilium/issues/28088 is fixed, | |
# (note v1.13: iproute2 is still used for loading cgroup progs, so we can't | |
# guarantee no missed tail calls during loading of those programs. Leave this in.) | |
# host datapath once cilium-cli is upgraded to a version that includes | |
# https://github.com/cilium/cilium-cli/pull/2206. | |
EXTRA+=("--expected-drop-reasons=+Missed tail call,+Host datapath not ready") | |
fi | |
if [ "${{ matrix.tunnel }}" != "disabled" ]; then | |
# node-to-node-encryption test with tunneling is broken on this | |
# branch. It was skipped before we bumped cilium_cli_version from | |
# v0.15.3 to v0.15.19, because we don't have encryption enabled, | |
# but cilium-cli changed it in | |
# https://github.com/cilium/cilium-cli/commit/32e12a8e5ab25c54ffe5366825e420a30ea4c3fe | |
EXTRA+=('--test=!node-to-node-encryption') | |
fi | |
./cilium-cli connectivity test --include-unsafe-tests --collect-sysdump-on-failure \ | |
"${EXTRA[@]}" \ | |
--sysdump-hubble-flows-count=1000000 --sysdump-hubble-flows-timeout=5m \ | |
--sysdump-output-filename "cilium-sysdump-${{ matrix.name }}-<ts>" \ | |
--junit-file "cilium-junits/${{ env.job_name }} (${{ matrix.name }}).xml" \ | |
--junit-property github_job_step="Run tests (${{ matrix.name }})" | |
- name: Fetch artifacts | |
if: ${{ !success() && steps.run-tests.outcome != 'skipped' }} | |
shell: bash | |
run: | | |
kubectl get pods --all-namespaces -o wide | |
./cilium-cli status | |
mkdir -p cilium-sysdumps | |
./cilium-cli sysdump --output-filename cilium-sysdump-${{ matrix.name }}-final | |
- name: Upload artifacts | |
if: ${{ !success() }} | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: cilium-sysdumps-${{ matrix.name }} | |
path: cilium-sysdump-*.zip | |
- name: Upload JUnits [junit] | |
if: ${{ always() }} | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: cilium-junits-${{ matrix.name }} | |
path: cilium-junits/*.xml | |
- name: Publish Test Results As GitHub Summary | |
if: ${{ always() }} | |
uses: aanm/junit2md@332ebf0fddd34e91b03a832cfafaa826306558f9 # v0.0.3 | |
with: | |
junit-directory: "cilium-junits" | |
merge-upload: | |
if: ${{ always() }} | |
name: Merge and Upload Artifacts | |
runs-on: ubuntu-latest | |
needs: setup-and-test | |
steps: | |
- name: Merge Sysdumps | |
if: ${{ needs.setup-and-test.result == 'failure' }} | |
uses: actions/upload-artifact/merge@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: cilium-sysdumps | |
pattern: cilium-sysdumps-* | |
retention-days: 5 | |
delete-merged: true | |
continue-on-error: true | |
- name: Merge JUnits | |
uses: actions/upload-artifact/merge@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: cilium-junits | |
pattern: cilium-junits-* | |
retention-days: 5 | |
delete-merged: true | |
commit-status-final: | |
if: ${{ always() }} | |
name: Commit Status Final | |
needs: setup-and-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set final commit status | |
uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1 | |
with: | |
sha: ${{ inputs.SHA || github.sha }} | |
status: ${{ needs.setup-and-test.result }} |