Cilium E2E Upgrade (ci-e2e-upgrade) #2239
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: Cilium E2E Upgrade (ci-e2e-upgrade) | |
# 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: '{}' | |
push: | |
branches: | |
- 'renovate/v1.16-**' | |
# By specifying the access of one of the scopes, all of those that are not | |
# specified are set to 'none'. | |
permissions: | |
# To read actions state with catchpoint/workflow-telemetry-action | |
actions: read | |
# 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 == 'push' && github.sha) || | |
(github.event_name == 'schedule' && github.sha) || | |
(github.event_name == 'workflow_dispatch' && github.event.inputs.PR-number) | |
}} | |
cancel-in-progress: true | |
env: | |
cilium_cli_ci_version: | |
jobs: | |
echo-inputs: | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
name: Echo Workflow Dispatch Inputs | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Echo Workflow Dispatch Inputs | |
run: | | |
echo '${{ tojson(inputs) }}' | |
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 }} | |
wait-for-images: | |
name: Wait for images | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout context ref (trusted) | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ inputs.context-ref || github.sha }} | |
persist-credentials: false | |
- name: Wait for images | |
uses: ./.github/actions/wait-for-images | |
with: | |
SHA: ${{ inputs.SHA }} | |
setup-and-test: | |
needs: [wait-for-images] | |
runs-on: ${{ vars.GH_RUNNER_EXTRA_POWER_UBUNTU_LATEST || 'ubuntu-latest' }} | |
name: 'Setup & Test' | |
env: | |
job_name: 'Setup & Test' | |
strategy: | |
fail-fast: false | |
max-parallel: 27 | |
matrix: | |
include: | |
- name: '1' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: 'rhel8.6-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'false' | |
tunnel: 'vxlan' | |
host-fw: 'true' | |
- name: '2' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.4-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'false' | |
tunnel: 'disabled' | |
host-fw: 'true' | |
- name: '3' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.10-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'false' | |
tunnel: 'disabled' | |
endpoint-routes: 'true' | |
kvstore: 'true' | |
- name: '4' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.10-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
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-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'disabled' | |
lb-mode: 'dsr' | |
endpoint-routes: 'true' | |
egress-gateway: 'true' | |
host-fw: 'false' # enabling breaks downgrading (missed tail calls) | |
- name: '6' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.1-20241218.004849' | |
kube-proxy: 'none' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
tunnel: 'vxlan' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
host-fw: 'true' | |
lb-acceleration: 'testing-only' | |
ingress-controller: 'true' | |
bgp-control-plane: 'true' | |
- name: '7' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20241218.004849' | |
kube-proxy: 'none' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'disabled' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
lb-acceleration: 'testing-only' | |
ingress-controller: 'true' | |
local-redirect-policy: 'true' | |
node-local-dns: 'true' | |
- name: '8' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'false' | |
tunnel: 'geneve' | |
endpoint-routes: 'true' | |
local-redirect-policy: 'true' | |
node-local-dns: 'true' | |
- name: '9' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.10-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
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-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'false' | |
tunnel: 'disabled' | |
encryption: 'wireguard' | |
encryption-node: 'false' | |
misc: 'socketLB.enabled=true' | |
local-redirect-policy: 'true' | |
node-local-dns: 'true' | |
- name: '11' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.1-20241218.004849' | |
kube-proxy: 'none' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'vxlan' | |
encryption: 'wireguard' | |
encryption-node: 'true' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
ingress-controller: 'true' | |
misc: 'socketLB.hostNamespaceOnly=true' | |
local-redirect-policy: 'true' | |
node-local-dns: 'true' | |
- name: '12' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20241218.004849' | |
kube-proxy: 'none' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'disabled' | |
encryption: 'wireguard' | |
encryption-node: 'true' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
ingress-controller: 'true' | |
skip-upgrade: 'true' | |
- name: '13' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: 'rhel8.6-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'false' | |
tunnel: 'vxlan' | |
misc: 'policyCIDRMatchMode=nodes' | |
- name: '14' | |
# Switch to 5.15 until https://github.com/cilium/cilium/issues/27642 | |
# has been resolved. https://github.com/cilium/cilium/pull/30837#issuecomment-1960897445 | |
# explains why 5.4 might cause north-south-loadbalancing tests to | |
# fail. | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.15-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'vxlan' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
lb-acceleration: 'testing-only' | |
ingress-controller: 'true' | |
- name: '15' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20241218.004849' | |
kube-proxy: 'none' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'disabled' | |
ingress-controller: 'true' | |
# Disable bpf.tproxy=true until https://github.com/cilium/cilium/issues/31918 | |
# has been resolved. | |
misc: 'bpfClockProbe=false,cni.uninstall=false' | |
ciliumendpointslice: 'true' | |
- name: '16' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.15-20241218.004849' | |
kube-proxy: 'none' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'vxlan' | |
lb-mode: 'snat' | |
encryption: 'wireguard' | |
encryption-node: 'false' | |
host-fw: 'true' | |
ciliumendpointslice: 'true' | |
ingress-controller: 'true' | |
- name: '17' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.12-20241218.004849' | |
misc: 'bpf.datapathMode=netkit,bpf.masquerade=true,enableIPv4BIGTCP=true,enableIPv6BIGTCP=true' | |
kube-proxy: 'none' | |
kpr: 'true' | |
ipv6: 'true' | |
tunnel: 'disabled' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
ingress-controller: 'true' | |
skip-upgrade: 'true' | |
- name: '18' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.12-20241218.004849' | |
misc: 'bpf.datapathMode=netkit-l2,bpf.masquerade=true,enableIPv4BIGTCP=true,enableIPv6BIGTCP=true' | |
kube-proxy: 'none' | |
kpr: 'true' | |
ipv6: 'true' | |
tunnel: 'disabled' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
ingress-controller: 'true' | |
skip-upgrade: 'true' | |
- name: '19' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.12-20241218.004849' | |
misc: 'bpf.datapathMode=netkit,bpf.masquerade=true' | |
kube-proxy: 'none' | |
kpr: 'true' | |
tunnel: 'vxlan' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
ingress-controller: 'true' | |
kvstore: 'true' | |
skip-upgrade: 'true' | |
- name: '20' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.12-20241218.004849' | |
misc: 'bpf.datapathMode=netkit-l2,bpf.masquerade=true' | |
kube-proxy: 'none' | |
kpr: 'true' | |
tunnel: 'vxlan' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
ingress-controller: 'true' | |
skip-upgrade: 'true' | |
- name: '21' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.12-20241218.004849' | |
misc: 'bpf.datapathMode=netkit,bpf.masquerade=true' | |
kube-proxy: 'none' | |
kpr: 'true' | |
tunnel: 'geneve' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
ingress-controller: 'true' | |
skip-upgrade: 'true' | |
- name: '22' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.12-20241218.004849' | |
misc: 'bpf.datapathMode=netkit-l2,bpf.masquerade=true' | |
kube-proxy: 'none' | |
kpr: 'true' | |
tunnel: 'geneve' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
ingress-controller: 'true' | |
skip-upgrade: 'true' | |
- name: '23' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.15-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'disabled' | |
lb-mode: 'dsr' | |
endpoint-routes: 'true' | |
egress-gateway: 'true' | |
host-fw: 'true' | |
skip-upgrade: 'true' | |
- name: '24' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'false' | |
tunnel: 'geneve' | |
endpoint-routes: 'true' | |
misc: 'socketLB.enabled=false,nodePort.enabled=true,bpf.masquerade=true' | |
local-redirect-policy: 'true' | |
node-local-dns: 'true' | |
skip-upgrade: 'true' | |
- name: '25' | |
# Switch to 5.15 until https://github.com/cilium/cilium/issues/27642 | |
# has been resolved. https://github.com/cilium/cilium/pull/30837#issuecomment-1960897445 | |
# explains why 5.4 might cause north-south-loadbalancing tests to | |
# fail. | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '5.4-20241218.004849' | |
kube-proxy: 'iptables' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'vxlan' | |
lb-mode: 'snat' | |
egress-gateway: 'true' | |
lb-acceleration: 'testing-only' | |
ingress-controller: 'true' | |
skip-upgrade: 'true' | |
- name: '26' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.6-20241218.004849' | |
kube-proxy: 'none' | |
kpr: 'true' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
tunnel: 'disabled' | |
ingress-controller: 'true' | |
misc: 'bpf.tproxy=true' | |
ciliumendpointslice: 'true' | |
skip-upgrade: 'true' | |
- name: '27' | |
# renovate: datasource=docker depName=quay.io/lvh-images/kind | |
kernel: '6.12-20241218.004849' | |
misc: 'bpf.datapathMode=netkit,bpf.masquerade=true' | |
kube-proxy: 'none' | |
kpr: 'true' | |
ipv6: 'true' | |
tunnel: 'disabled' | |
devices: '{eth0,eth1}' | |
secondary-network: 'true' | |
ingress-controller: 'true' | |
host-fw: 'true' | |
skip-upgrade: 'true' | |
# Example of a feature that is being introduced, and we want to test | |
# it without performing an upgrade, we use skip-upgrade: 'true' | |
# - name: '27' | |
# # renovate: datasource=docker depName=quay.io/lvh-images/kind | |
# kernel: 'bpf-20241218.004849' | |
# misc: 'bpf.datapathMode=netkit-l2,bpf.masquerade=true' | |
# skip-upgrade: 'true' | |
timeout-minutes: 90 | |
steps: | |
- name: Collect Workflow Telemetry | |
uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 | |
with: | |
comment_on_pr: false | |
- name: Checkout context ref (trusted) | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ inputs.context-ref || github.sha }} | |
persist-credentials: false | |
- name: Cleanup Disk space in runner | |
if: runner.name == 'ubuntu-latest' | |
uses: ./.github/actions/disk-cleanup | |
- 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 | |
CILIUM_DOWNGRADE_VERSION=$(contrib/scripts/print-downgrade-version.sh stable) | |
echo downgrade_version=${CILIUM_DOWNGRADE_VERSION} >> $GITHUB_OUTPUT | |
- name: Derive stable Cilium installation config | |
if: ${{ matrix.skip-upgrade != 'true' }} | |
id: cilium-stable-config | |
uses: ./.github/actions/cilium-config | |
with: | |
image-tag: ${{ steps.vars.outputs.downgrade_version }} | |
chart-dir: './untrusted/cilium-downgrade/install/kubernetes/cilium/' | |
tunnel: ${{ matrix.tunnel }} | |
devices: ${{ matrix.devices }} | |
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 }} | |
mutual-auth: false | |
ingress-controller: ${{ matrix.ingress-controller }} | |
misc: ${{ matrix.misc || 'bpfClockProbe=false,cni.uninstall=false' }} | |
ciliumendpointslice: ${{ matrix.ciliumendpointslice }} | |
local-redirect-policy: ${{ matrix.local-redirect-policy }} | |
bgp-control-plane: ${{ matrix.bgp-control-plane }} | |
- name: Derive newest Cilium installation config | |
id: cilium-newest-config | |
uses: ./.github/actions/cilium-config | |
with: | |
image-tag: ${{ steps.vars.outputs.sha }} | |
chart-dir: './untrusted/cilium-newest/install/kubernetes/cilium' | |
tunnel: ${{ matrix.tunnel }} | |
devices: ${{ matrix.devices }} | |
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 }} | |
mutual-auth: false | |
ingress-controller: ${{ matrix.ingress-controller }} | |
misc: ${{ matrix.misc || 'bpfClockProbe=false,cni.uninstall=false' }} | |
ciliumendpointslice: ${{ matrix.ciliumendpointslice }} | |
local-redirect-policy: ${{ matrix.local-redirect-policy }} | |
bgp-control-plane: ${{ matrix.bgp-control-plane }} | |
- name: Install Cilium CLI | |
uses: cilium/cilium-cli@c52e8c38e6d6235bd8e6e961199a984275547d6f # v0.16.22 | |
with: | |
repository: ${{ env.CILIUM_CLI_RELEASE_REPO }} | |
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 }} | |
- name: Start Cilium KVStore | |
id: kvstore | |
if: matrix.kvstore == 'true' | |
run: | | |
make kind-kvstore-start KVSTORE_POD_NAME=kvstore KVSTORE_POD_PORT=2378 | |
IP=$(kubectl --namespace kube-system get pod kvstore -o jsonpath='{.status.hostIP}') | |
echo "config= \ | |
--set=etcd.enabled=true \ | |
--set=identityAllocationMode=kvstore \ | |
--set=etcd.endpoints[0]=http://${IP}:2378 \ | |
" >> $GITHUB_OUTPUT | |
# 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ steps.vars.outputs.sha }} | |
persist-credentials: false | |
path: untrusted/cilium-newest | |
sparse-checkout: | | |
install/kubernetes/cilium | |
examples | |
- name: Checkout ${{ steps.vars.outputs.downgrade_version }} branch to get the Helm chart | |
if: ${{ matrix.skip-upgrade != 'true' }} | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ steps.vars.outputs.downgrade_version }} | |
persist-credentials: false | |
path: untrusted/cilium-downgrade | |
sparse-checkout: | | |
install/kubernetes/cilium | |
- name: Install Cilium ${{ matrix.skip-upgrade == 'true' && 'from v1.16' || steps.vars.outputs.downgrade_version }} | |
shell: bash | |
run: | | |
kubectl patch node kind-worker3 --type=json -p='[{"op":"add","path":"/metadata/labels/cilium.io~1no-schedule","value":"true"}]' | |
if ${{ matrix.skip-upgrade != 'true' }}; then | |
./cilium-cli install \ | |
${{ steps.cilium-stable-config.outputs.config }} \ | |
${{ steps.kvstore.outputs.config }} | |
else | |
./cilium-cli install \ | |
${{ steps.cilium-newest-config.outputs.config }} \ | |
${{ steps.kvstore.outputs.config }} | |
fi | |
./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: Install node local DNS | |
if: ${{ matrix.node-local-dns == 'true' }} | |
shell: bash | |
run: | | |
kubedns=$(kubectl get svc kube-dns -n kube-system -o jsonpath={.spec.clusterIP}) && sed -i "s/__PILLAR__DNS__SERVER__/$kubedns/g;" untrusted/cilium-newest/examples/kubernetes-local-redirect/node-local-dns.yaml | |
sed -i "s/__PILLAR__UPSTREAM__SERVERS__/1.1.1.1/g;" untrusted/cilium-newest/examples/kubernetes-local-redirect/node-local-dns.yaml | |
kubectl apply -k untrusted/cilium-newest/examples/kubernetes-local-redirect | |
kubectl rollout status -n kube-system ds/node-local-dns | |
- name: Start conn-disrupt-test | |
shell: bash | |
run: | | |
# Create pods which establish long lived connections. It will be used by | |
# subsequent connectivity tests with --include-conn-disrupt-test to catch any | |
# interruption in such flows. | |
./cilium-cli connectivity test --include-conn-disrupt-test --conn-disrupt-test-setup \ | |
--conn-disrupt-dispatch-interval 0ms | |
- name: Upgrade Cilium | |
if: ${{ matrix.skip-upgrade != 'true' }} | |
shell: bash | |
run: | | |
./cilium-cli upgrade \ | |
${{ steps.cilium-newest-config.outputs.config }} \ | |
${{ steps.kvstore.outputs.config }} | |
./cilium-cli status --wait --wait-duration=10m | |
kubectl get pods --all-namespaces -o wide | |
kubectl -n kube-system exec daemonset/cilium -- cilium status | |
- name: Restart LRP backend pod | |
if: ${{ matrix.skip-upgrade != 'true' && matrix.local-redirect-policy == 'true' }} | |
shell: bash | |
run: | | |
# Restart lrp-backend pod to set the netns cookie to the endpoint | |
for ns in $(kubectl get deploy --all-namespaces -o jsonpath="{.items[?(@.metadata.name=='lrp-backend')].metadata.namespace}"); do | |
kubectl rollout restart -n $ns deploy/lrp-backend | |
kubectl rollout status -n $ns deploy/lrp-backend | |
done | |
- name: Test Cilium ${{ matrix.skip-upgrade != 'true' && 'after upgrade' }} | |
shell: bash | |
run: | | |
EXTRA=() | |
if [ "${{ matrix.secondary-network }}" = "true" ]; then | |
EXTRA+=("--secondary-network-iface=eth1") | |
fi | |
# it's fine to ignore the "No egress gateway found" drop reason as this may be caused by the kind=echo pods | |
# sending traffic while the egressgw policy map is still being populated. | |
# | |
# The actual connectivity test will ensure that the map is in sync with the policy and that egressgw traffic | |
# always go through the correct gateway | |
EXTRA+=("--expected-drop-reasons=+No egress gateway found") | |
./cilium-cli connectivity test --include-unsafe-tests --collect-sysdump-on-failure \ | |
--include-conn-disrupt-test \ | |
--flush-ct \ | |
--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 upgrade 2 (${{ matrix.name }})" \ | |
"${EXTRA[@]}" | |
# --flush-ct interrupts the flows, so we need to set up again. | |
./cilium-cli connectivity test --include-conn-disrupt-test --conn-disrupt-test-setup \ | |
--conn-disrupt-dispatch-interval 0ms | |
- name: Features tested before downgrade | |
uses: ./.github/actions/feature-status | |
with: | |
title: "Summary of all features tested before downgrade" | |
json-filename: "${{ env.job_name }} (${{ matrix.name }}) - before downgrade" | |
cilium-cli: './cilium-cli' | |
- name: Downgrade Cilium ${{ steps.vars.outputs.downgrade_version }} | |
if: ${{ matrix.skip-upgrade != 'true' }} | |
shell: bash | |
run: | | |
./cilium-cli upgrade \ | |
${{ steps.cilium-stable-config.outputs.config }} \ | |
${{ steps.kvstore.outputs.config }} | |
./cilium-cli status --wait --wait-duration=10m | |
kubectl get pods --all-namespaces -o wide | |
kubectl -n kube-system exec daemonset/cilium -- cilium status | |
- name: Test Cilium after downgrade to ${{ steps.vars.outputs.downgrade_version }} | |
if: ${{ matrix.skip-upgrade != 'true' }} | |
shell: bash | |
run: | | |
EXTRA=() | |
if [ "${{ matrix.secondary-network }}" = "true" ]; then | |
EXTRA+=("--secondary-network-iface=eth1") | |
fi | |
# it's fine to ignore the "No egress gateway found" drop reason as this may be caused by the kind=echo pods | |
# sending traffic while the egressgw policy map is still being populated. | |
# | |
# The actual connectivity test will ensure that the map is in sync with the policy and that egressgw traffic | |
# always go through the correct gateway | |
EXTRA+=("--expected-drop-reasons=+No egress gateway found") | |
./cilium-cli connectivity test --include-unsafe-tests --collect-sysdump-on-failure \ | |
--include-conn-disrupt-test \ | |
--flush-ct \ | |
--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 upgrade 2 (${{ matrix.name }})" \ | |
"${EXTRA[@]}" | |
- name: Features tested after downgrade | |
uses: ./.github/actions/feature-status | |
with: | |
title: "Summary of all features tested after downgrade" | |
json-filename: "${{ env.job_name }} (${{ matrix.name }}) - after downgrade" | |
cilium-cli: './cilium-cli' | |
- name: Fetch artifacts | |
if: ${{ !success() }} | |
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 | |
if [ "${{ matrix.kvstore }}" == "true" ]; then | |
echo | |
echo "# Retrieving Cilium etcd logs" | |
kubectl -n kube-system logs kvstore | |
fi | |
- name: Upload artifacts | |
if: ${{ !success() }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: cilium-sysdumps-${{ matrix.name }} | |
path: cilium-sysdump-*.zip | |
- name: Upload JUnits [junit] | |
if: ${{ always() }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: cilium-junits-${{ matrix.name }} | |
path: cilium-junits/*.xml | |
- name: Upload features tested | |
if: ${{ always() }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: features-tested-${{ matrix.name }} | |
path: ${{ env.job_name }}*.json | |
- 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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: cilium-junits | |
pattern: cilium-junits-* | |
retention-days: 5 | |
delete-merged: true | |
- name: Merge Features tested | |
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: features-tested | |
pattern: features-tested-* | |
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 }} |