Skip to content

Commit

Permalink
ci: kata-deploy: Export KUBERNETES env var
Browse files Browse the repository at this point in the history
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 fa62a4c,
for the k8s tests.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit 9e1fb8a)
  • Loading branch information
fidencio committed Sep 21, 2023
1 parent abe9dc9 commit f09c255
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/run-kata-deploy-tests-on-aks.yaml
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-kata-deploy-tests-on-tdx.yaml
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/kata-deploy/kata-deploy.bats
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit f09c255

Please sign in to comment.