diff --git a/.github/workflows/run-kata-coco-tests.yaml b/.github/workflows/run-kata-coco-tests.yaml index 7e653982f..3256c26e5 100644 --- a/.github/workflows/run-kata-coco-tests.yaml +++ b/.github/workflows/run-kata-coco-tests.yaml @@ -29,6 +29,10 @@ jobs: matrix: vmm: - qemu-tdx + snapshotter: + - nydus + pull-type: + - guest-pull runs-on: tdx env: DOCKER_REGISTRY: ${{ inputs.registry }} @@ -38,6 +42,8 @@ jobs: KATA_HYPERVISOR: ${{ matrix.vmm }} KUBERNETES: "k3s" USING_NFD: "true" + SNAPSHOTTER: ${{ matrix.snapshotter }} + PULL_TYPE: ${{ matrix.pull-type }} steps: - uses: actions/checkout@v4 with: @@ -59,6 +65,10 @@ jobs: matrix: vmm: - qemu-tdx + snapshotter: + - nydus + pull-type: + - guest-pull runs-on: tdx env: DOCKER_REGISTRY: ${{ inputs.registry }} @@ -69,6 +79,8 @@ jobs: KUBERNETES: "k3s" USING_NFD: "true" K8S_TEST_HOST_TYPE: "baremetal" + SNAPSHOTTER: ${{ matrix.snapshotter }} + PULL_TYPE: ${{ matrix.pull-type }} steps: - uses: actions/checkout@v4 with: @@ -81,6 +93,10 @@ jobs: env: TARGET_BRANCH: ${{ inputs.target-branch }} + - name: Deploy Snapshotter + timeout-minutes: 5 + run: bash tests/integration/kubernetes/gha-run.sh deploy-snapshotter + - name: Deploy Kata timeout-minutes: 10 run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-tdx @@ -93,12 +109,20 @@ jobs: if: always() run: bash tests/integration/kubernetes/gha-run.sh cleanup-tdx + - name: Delete Snapshotter + if: always() + run: bash tests/integration/kubernetes/gha-run.sh cleanup-snapshotter + run-k8s-tests-on-sev: strategy: fail-fast: false matrix: vmm: - qemu-sev + snapshotter: + - nydus + pull-type: + - guest-pull runs-on: sev env: DOCKER_REGISTRY: ${{ inputs.registry }} @@ -110,6 +134,8 @@ jobs: KUBERNETES: "vanilla" USING_NFD: "false" K8S_TEST_HOST_TYPE: "baremetal" + SNAPSHOTTER: ${{ matrix.snapshotter }} + PULL_TYPE: ${{ matrix.pull-type }} steps: - uses: actions/checkout@v4 with: @@ -122,6 +148,10 @@ jobs: env: TARGET_BRANCH: ${{ inputs.target-branch }} + - name: Deploy Snapshotter + timeout-minutes: 5 + run: bash tests/integration/kubernetes/gha-run.sh deploy-snapshotter + - name: Deploy Kata timeout-minutes: 10 run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-sev @@ -134,12 +164,20 @@ jobs: if: always() run: bash tests/integration/kubernetes/gha-run.sh cleanup-sev + - name: Delete Snapshotter + if: always() + run: bash tests/integration/kubernetes/gha-run.sh cleanup-snapshotter + run-k8s-tests-sev-snp: strategy: fail-fast: false matrix: vmm: - qemu-snp + snapshotter: + - nydus + pull-type: + - guest-pull runs-on: sev-snp env: DOCKER_REGISTRY: ${{ inputs.registry }} @@ -151,6 +189,8 @@ jobs: KUBERNETES: "vanilla" USING_NFD: "false" K8S_TEST_HOST_TYPE: "baremetal" + SNAPSHOTTER: ${{ matrix.snapshotter }} + PULL_TYPE: ${{ matrix.pull-type }} steps: - uses: actions/checkout@v4 with: @@ -163,6 +203,10 @@ jobs: env: TARGET_BRANCH: ${{ inputs.target-branch }} + - name: Deploy Snapshotter + timeout-minutes: 5 + run: bash tests/integration/kubernetes/gha-run.sh deploy-snapshotter + - name: Deploy Kata timeout-minutes: 10 run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-snp @@ -174,3 +218,7 @@ jobs: - name: Delete kata-deploy if: always() run: bash tests/integration/kubernetes/gha-run.sh cleanup-snp + + - name: Delete Snapshotter + if: always() + run: bash tests/integration/kubernetes/gha-run.sh cleanup-snapshotter diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index 86c7da7f9..17a1e0d1c 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -241,6 +241,18 @@ install_kata_tools_placeholder() { "after CI picks up the gha yaml changes required to test that installation." } +function deploy_snapshotter() { + echo "::group::Deploying ${SNAPSHOTTER:-}" + #TODO Add the deployment logic for the snapshotter in PR https://github.com/kata-containers/kata-containers/pull/8585. + echo "::endgroup::" +} + +function cleanup_snapshotter() { + echo "::group::Cleanuping ${SNAPSHOTTER:-}" + #TODO Add the logic for cleaning up the snapshotter in PR https://github.com/kata-containers/kata-containers/pull/8585. + echo "::endgroup::" +} + function main() { export KATA_HOST_OS="${KATA_HOST_OS:-}" export K8S_TEST_HOST_TYPE="${K8S_TEST_HOST_TYPE:-}" @@ -267,6 +279,7 @@ function main() { deploy-kata-tdx) deploy_kata "tdx" ;; deploy-kata-garm) deploy_kata "garm" ;; deploy-kata-zvsi) deploy_kata "zvsi" ;; + deploy-snapshotter) deploy_snapshotter ;; run-tests) run_tests ;; run-tests-kcli) run_tests "kcli" ;; cleanup-kcli) cleanup "kcli" ;; @@ -275,6 +288,7 @@ function main() { cleanup-tdx) cleanup "tdx" ;; cleanup-garm) cleanup "garm" ;; cleanup-zvsi) cleanup "zvsi" ;; + cleanup-snapshotter) cleanup_snapshotter ;; delete-cluster) cleanup "aks" ;; delete-cluster-kcli) delete_cluster_kcli ;; *) >&2 echo "Invalid argument"; exit 2 ;;