From f09c255766cf62396763f4b45d3c06dc1e999ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 11 Sep 2023 16:14:42 +0200 Subject: [PATCH] ci: kata-deploy: Export KUBERNETES env var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So we have a better control on which flavour of kubernetes kata-deploy is expected to be targetting. This was also done as part of fa62a4c01b9ffac59bfe8740ee9c82e4c4f2dc81, for the k8s tests. Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit 9e1fb8a96660d8c87a8c2e3effd52ff50603bbaa) --- .github/workflows/run-kata-deploy-tests-on-aks.yaml | 1 + .github/workflows/run-kata-deploy-tests-on-tdx.yaml | 1 + tests/functional/kata-deploy/kata-deploy.bats | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-kata-deploy-tests-on-aks.yaml b/.github/workflows/run-kata-deploy-tests-on-aks.yaml index 8962fcf329..74fcb0ea57 100644 --- a/.github/workflows/run-kata-deploy-tests-on-aks.yaml +++ b/.github/workflows/run-kata-deploy-tests-on-aks.yaml @@ -44,6 +44,7 @@ jobs: GH_PR_NUMBER: ${{ inputs.pr-number }} KATA_HOST_OS: ${{ matrix.host_os }} KATA_HYPERVISOR: ${{ matrix.vmm }} + KUBERNETES: "vanilla" USING_NFD: "false" steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/run-kata-deploy-tests-on-tdx.yaml b/.github/workflows/run-kata-deploy-tests-on-tdx.yaml index b9e7e0588d..6b439cea8c 100644 --- a/.github/workflows/run-kata-deploy-tests-on-tdx.yaml +++ b/.github/workflows/run-kata-deploy-tests-on-tdx.yaml @@ -36,6 +36,7 @@ jobs: DOCKER_TAG: ${{ inputs.tag }} PR_NUMBER: ${{ inputs.pr-number }} KATA_HYPERVISOR: ${{ matrix.vmm }} + KUBERNETES: "k3s" USING_NFD: "true" steps: - uses: actions/checkout@v3 diff --git a/tests/functional/kata-deploy/kata-deploy.bats b/tests/functional/kata-deploy/kata-deploy.bats index 84faf8fe14..95d32e2b9d 100644 --- a/tests/functional/kata-deploy/kata-deploy.bats +++ b/tests/functional/kata-deploy/kata-deploy.bats @@ -48,7 +48,7 @@ setup() { echo "::endgroup::" kubectl apply -f "${repo_root_dir}/tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml" - if [ "${platform}" = "tdx" ]; then + if [ "${KUBERNETES}" = "k3s" ]; then kubectl apply -k "${repo_root_dir}/tools/packaging/kata-deploy/kata-deploy/overlays/k3s" else kubectl apply -f "${repo_root_dir}/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" @@ -74,7 +74,7 @@ setup() { teardown() { kubectl get runtimeclasses -o name | grep -v "kata-mshv-vm-isolation" - if [ "${platform}" = "tdx" ]; then + if [ "${KUBERNETES}" = "k3s" ]; then deploy_spec="-k "${repo_root_dir}/tools/packaging/kata-deploy/kata-deploy/overlays/k3s"" cleanup_spec="-k "${repo_root_dir}/tools/packaging/kata-deploy/kata-cleanup/overlays/k3s"" else