From e30e2b5f45278949df0bb2610b166ebeb0a8d4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 29 Oct 2025 14:58:15 +0100 Subject: [PATCH] tests: k8s: Remove tests running on GitHub provided runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have 2 tests running on GitHub provided runners: * devmapper * CRI-O - devmapper situation For devmapper, we're currently testing devmapper with s390x as part of one of its jobs. More than that, this test has been failing here due to a lack of space in the machine for quite some time, and no-action was taken to bring it back either via GARM or some other way. With that said, let's rely on the s390x CI to test devmapper and avoid one extra failure on our CI by removing this one. - cri-o situation CRI-O is being tested with a fixed version of kubernetes that's already reached its EOL, and a CRI-O version that matches that k8s version. There has been attempts to raise issues, and also to provide a PR that does at least part of the work ... leaving the debugging part for the maintainers of the CI. However, there was no action on those from the maintainers. Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/ci.yaml | 12 -- .github/workflows/run-k8s-tests-on-amd64.yaml | 129 ------------------ tests/gha-run-k8s-common.sh | 28 ---- tests/integration/kubernetes/gha-run.sh | 1 - versions.yaml | 13 -- 5 files changed, 183 deletions(-) delete mode 100644 .github/workflows/run-k8s-tests-on-amd64.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 16e660e2f1..417dc2880a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -311,18 +311,6 @@ jobs: AZ_TENANT_ID: ${{ secrets.AZ_TENANT_ID }} AZ_SUBSCRIPTION_ID: ${{ secrets.AZ_SUBSCRIPTION_ID }} - run-k8s-tests-on-amd64: - if: ${{ inputs.skip-test != 'yes' }} - needs: publish-kata-deploy-payload-amd64 - uses: ./.github/workflows/run-k8s-tests-on-amd64.yaml - with: - registry: ghcr.io - repo: ${{ github.repository_owner }}/kata-deploy-ci - tag: ${{ inputs.tag }}-amd64 - commit-hash: ${{ inputs.commit-hash }} - pr-number: ${{ inputs.pr-number }} - target-branch: ${{ inputs.target-branch }} - run-k8s-tests-on-arm64: if: ${{ inputs.skip-test != 'yes' }} needs: publish-kata-deploy-payload-arm64 diff --git a/.github/workflows/run-k8s-tests-on-amd64.yaml b/.github/workflows/run-k8s-tests-on-amd64.yaml deleted file mode 100644 index 4b7d72be27..0000000000 --- a/.github/workflows/run-k8s-tests-on-amd64.yaml +++ /dev/null @@ -1,129 +0,0 @@ -name: CI | Run kubernetes tests on amd64 -on: - workflow_call: - inputs: - registry: - required: true - type: string - repo: - required: true - type: string - tag: - required: true - type: string - pr-number: - required: true - type: string - commit-hash: - required: false - type: string - target-branch: - required: false - type: string - default: "" - -permissions: {} - -jobs: - run-k8s-tests-amd64: - name: run-k8s-tests-amd64 - strategy: - fail-fast: false - matrix: - vmm: - - qemu - container_runtime: - - containerd - snapshotter: - - devmapper - k8s: - - k3s - include: - - vmm: qemu - container_runtime: crio - snapshotter: "" - k8s: k0s - runs-on: ubuntu-22.04 - env: - DOCKER_REGISTRY: ${{ inputs.registry }} - DOCKER_REPO: ${{ inputs.repo }} - DOCKER_TAG: ${{ inputs.tag }} - GH_PR_NUMBER: ${{ inputs.pr-number }} - KATA_HYPERVISOR: ${{ matrix.vmm }} - KUBERNETES: ${{ matrix.k8s }} - KUBERNETES_EXTRA_PARAMS: ${{ matrix.container_runtime != 'crio' && '' || '--cri-socket remote:unix:///var/run/crio/crio.sock --kubelet-extra-args --cgroup-driver="systemd"' }} - SNAPSHOTTER: ${{ matrix.snapshotter }} - K8S_TEST_HOST_TYPE: all - CONTAINER_RUNTIME: ${{ matrix.container_runtime }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - ref: ${{ inputs.commit-hash }} - fetch-depth: 0 - persist-credentials: false - - - name: Rebase atop of the latest target branch - run: | - ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" - env: - TARGET_BRANCH: ${{ inputs.target-branch }} - - - name: Remove unnecessary directories to free up space - run: | - sudo rm -rf /usr/local/.ghcup - sudo rm -rf /opt/hostedtoolcache/CodeQL - sudo rm -rf /usr/local/lib/android - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf /usr/local/share/boost - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - sudo rm -rf /usr/lib/jvm - sudo rm -rf /usr/share/swift - sudo rm -rf /usr/local/share/powershell - sudo rm -rf /usr/local/julia* - sudo rm -rf /opt/az - sudo rm -rf /usr/local/share/chromium - sudo rm -rf /opt/microsoft - sudo rm -rf /opt/google - sudo rm -rf /usr/lib/firefox - - - name: Configure CRI-O - if: matrix.container_runtime == 'crio' - run: bash tests/integration/kubernetes/gha-run.sh setup-crio - - - name: Deploy ${{ matrix.k8s }} - run: bash tests/integration/kubernetes/gha-run.sh deploy-k8s - env: - CONTAINER_RUNTIME: ${{ matrix.container_runtime }} - - - name: Configure the ${{ matrix.snapshotter }} snapshotter - if: matrix.snapshotter != '' - run: bash tests/integration/kubernetes/gha-run.sh configure-snapshotter - - - name: Deploy Kata - timeout-minutes: 10 - run: bash tests/integration/kubernetes/gha-run.sh deploy-kata - - - name: Install `bats` - run: bash tests/integration/kubernetes/gha-run.sh install-bats - - - name: Run tests - timeout-minutes: 30 - run: bash tests/integration/kubernetes/gha-run.sh run-tests - - - name: Collect artifacts ${{ matrix.vmm }} - if: always() - run: bash tests/integration/kubernetes/gha-run.sh collect-artifacts - continue-on-error: true - - - name: Archive artifacts ${{ matrix.vmm }} - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: k8s-tests-${{ matrix.vmm }}-${{ matrix.snapshotter }}-${{ matrix.k8s }}-${{ inputs.tag }} - path: /tmp/artifacts - retention-days: 1 - - - name: Delete kata-deploy - if: always() - timeout-minutes: 5 - run: bash tests/integration/kubernetes/gha-run.sh cleanup diff --git a/tests/gha-run-k8s-common.sh b/tests/gha-run-k8s-common.sh index 93a41ced30..20f1cc32be 100644 --- a/tests/gha-run-k8s-common.sh +++ b/tests/gha-run-k8s-common.sh @@ -343,34 +343,6 @@ function deploy_microk8s() { sudo rm -rf /usr/local/bin/kubectl } -function _get_k0s_kubernetes_version_for_crio() { - # k0s version will look like: - # v1.27.5+k0s.0 - # - # The CRI-O repo for such version of Kubernetes expects something like: - # 1.27 - k0s_version=$(get_from_kata_deps ".externals.k0s.version") - - # Remove everything after the second '.' - crio_version=${k0s_version%\.*+*} - # Remove the 'v' - crio_version=${crio_version#v} - - echo "${crio_version}" -} - -function setup_crio() { - # Get the CRI-O version to be installed depending on the version of the - # "k8s distro" that we are using - case "${KUBERNETES}" in - k0s) crio_version=$(_get_k0s_kubernetes_version_for_crio) ;; - *) >&2 echo "${KUBERNETES} flavour is not supported with CRI-O"; exit 2 ;; - - esac - - install_crio "${crio_version}" -} - function install_system_dependencies() { dependencies="${1}" diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index 9f8df0f7a1..424fcd604f 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -588,7 +588,6 @@ function main() { create-cluster) create_cluster "" ;; create-cluster-kcli) create_cluster_kcli ;; configure-snapshotter) configure_snapshotter ;; - setup-crio) setup_crio ;; deploy-coco-kbs) deploy_coco_kbs ;; deploy-k8s) deploy_k8s ${CONTAINER_ENGINE:-} ${CONTAINER_ENGINE_VERSION:-};; install-bats) install_bats ;; diff --git a/versions.yaml b/versions.yaml index c649dd492f..f2b2cf0229 100644 --- a/versions.yaml +++ b/versions.yaml @@ -263,12 +263,6 @@ externals: ita_image_tag: "ea56c1bfa7e912f39e270ffe738b19ac8113af3d-x86_64" toolchain: "1.85.1" - crio: - description: | - OCI-based Kubernetes Container Runtime Interface implementation - url: "https://github.com/cri-o/cri-o" - branch: "release-1.23" - containerd: description: | Containerd for Kubernetes Container Runtime Interface. @@ -317,13 +311,6 @@ externals: url: "https://github.com/lvmteam/lvm2" version: "v2_03_16" - # This is only used for CRI-O. - # kata-deploy tests rely on the latest version of k0s. - k0s: - description: "K0s Kubernetes distribution, used in cri-o testing" - url: "https://get.k0s.sh" - version: "v1.31.5+k0s.0" - kubernetes: description: "Kubernetes project container manager" url: "https://github.com/kubernetes/kubernetes"