diff --git a/.github/workflows/run-k8s-tests-on-nvidia-gpu.yaml b/.github/workflows/run-k8s-tests-on-nvidia-gpu.yaml index 20121004cf..27a86bac54 100644 --- a/.github/workflows/run-k8s-tests-on-nvidia-gpu.yaml +++ b/.github/workflows/run-k8s-tests-on-nvidia-gpu.yaml @@ -49,6 +49,8 @@ jobs: KATA_HYPERVISOR: ${{ matrix.environment.vmm }} KUBERNETES: kubeadm KBS: ${{ matrix.environment.name == 'nvidia-gpu-snp' && 'true' || 'false' }} + SNAPSHOTTER: ${{ matrix.environment.name == 'nvidia-gpu-snp' && 'nydus' || '' }} + USE_EXPERIMENTAL_SNAPSHOTTER_SETUP: ${{ matrix.environment.name == 'nvidia-gpu-snp' && 'true' || 'false' }} K8S_TEST_HOST_TYPE: baremetal steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/tests/gha-run-k8s-common.sh b/tests/gha-run-k8s-common.sh index ec7e667601..8c46103f4d 100644 --- a/tests/gha-run-k8s-common.sh +++ b/tests/gha-run-k8s-common.sh @@ -795,7 +795,7 @@ function helm_helper() { disable_snapshotter_setup=false for shim in ${HELM_SHIMS}; do case "${shim}" in - qemu-tdx|qemu-snp|qemu-nvidia-gpu-tdx|qemu-nvidia-gpu-snp) + qemu-tdx|qemu-snp) disable_snapshotter_setup=true break ;; diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index dbe7f41ba2..1a3da02d21 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -174,6 +174,17 @@ function deploy_kata() { set_default_cluster_namespace + # Workaround to avoid modifying the workflow yaml files + case "${KATA_HYPERVISOR}" in + qemu-nvidia-gpu-*) + USE_EXPERIMENTAL_SETUP_SNAPSHOTTER=true + SNAPSHOTTER="nydus" + EXPERIMENTAL_FORCE_GUEST_PULL=false + ;; + *) + ;; + esac + ANNOTATIONS="default_vcpus" if [[ "${KATA_HOST_OS}" = "cbl-mariner" ]]; then ANNOTATIONS="image kernel default_vcpus cc_init_data" @@ -207,8 +218,11 @@ function deploy_kata() { # as they are running on a GitHub runner (and not on a BM machine), # and there the snapshotter is deployed on every run (rather than # deployed when the machine is configured, as on the BM machines). - if [[ "${KATA_HYPERVISOR}" == qemu-coco-dev* ]] && [[ ${ARCH} == "x86_64" ]]; then - EXPERIMENTAL_SETUP_SNAPSHOTTER="${SNAPSHOTTER}" + if [[ ${ARCH} == "x86_64" ]]; then + case "${KATA_HYPERVISOR}" in + qemu-coco-dev*|qemu-nvidia-gpu-*) EXPERIMENTAL_SETUP_SNAPSHOTTER="${SNAPSHOTTER}" ;; + *) ;; + esac fi ;; *) ;; @@ -216,10 +230,6 @@ function deploy_kata() { fi EXPERIMENTAL_FORCE_GUEST_PULL="${EXPERIMENTAL_FORCE_GUEST_PULL:-}" - if [[ "${KATA_HYPERVISOR}" == "qemu-nvidia-gpu-"* ]]; then - EXPERIMENTAL_FORCE_GUEST_PULL="${KATA_HYPERVISOR}" - fi - export EXPERIMENTAL_FORCE_GUEST_PULL export HELM_K8S_DISTRIBUTION="${KUBERNETES}" export HELM_IMAGE_REFERENCE="${DOCKER_REGISTRY}/${DOCKER_REPO}" diff --git a/tests/integration/kubernetes/tests_common.sh b/tests/integration/kubernetes/tests_common.sh index bdf56b8ad7..d9c82d4d3f 100644 --- a/tests/integration/kubernetes/tests_common.sh +++ b/tests/integration/kubernetes/tests_common.sh @@ -148,9 +148,9 @@ install_genpolicy_drop_ins() { # 20-* OCI version overlay if [[ "${KATA_HOST_OS:-}" == "cbl-mariner" ]]; then cp "${examples_dir}/20-oci-1.2.0-drop-in.json" "${settings_d}/" - elif is_k3s_or_rke2 || is_nvidia_gpu_platform; then + elif is_k3s_or_rke2; then cp "${examples_dir}/20-oci-1.2.1-drop-in.json" "${settings_d}/" - elif [[ -n "${CONTAINER_ENGINE_VERSION:-}" ]]; then + elif is_nvidia_gpu_platform || [[ -n "${CONTAINER_ENGINE_VERSION:-}" ]]; then cp "${examples_dir}/20-oci-1.3.0-drop-in.json" "${settings_d}/" fi