From 3107533953b24ad574b3446789bb30ca4bcbda90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Sat, 1 Nov 2025 13:29:22 +0100 Subject: [PATCH] tests: Adjust to runtimeClass creation by the chart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's just a follow-up on the previous commit where we move away from the runtimeClass creation inside the script, and instead we do it using the chart itself. Signed-off-by: Fabiano FidĂȘncio --- tests/functional/kata-deploy/kata-deploy.bats | 7 ++++--- tests/gha-run-k8s-common.sh | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/functional/kata-deploy/kata-deploy.bats b/tests/functional/kata-deploy/kata-deploy.bats index 8f774e2ddd..260406f236 100644 --- a/tests/functional/kata-deploy/kata-deploy.bats +++ b/tests/functional/kata-deploy/kata-deploy.bats @@ -15,9 +15,10 @@ setup() { pushd "${repo_root_dir}" # We expect 2 runtime classes because: - # * `kata` is the default runtimeclass created, basically an alias for `kata-${KATA_HYPERVISOR}`. + # * `kata` is the default runtimeclass created by Helm, basically an alias for `kata-${KATA_HYPERVISOR}`. # * `kata-${KATA_HYPERVISOR}` is the other one - # * As part of the tests we're only deploying the specific runtimeclass that will be used, instead of all of them. + # * As part of the tests we're only deploying the specific runtimeclass that will be used (via HELM_SHIMS), instead of all of them. + # * RuntimeClasses are now created by the Helm chart (runtimeClasses.enabled=true by default) expected_runtime_classes=2 # We expect both runtime classes to have the same handler: kata-${KATA_HYPERVISOR} @@ -40,7 +41,7 @@ setup() { # Set the tested hypervisor as the default `kata` shim export HELM_DEFAULT_SHIM="${KATA_HYPERVISOR}" - # Let the `kata-deploy` create the default `kata` runtime class + # Let the Helm chart create the default `kata` runtime class export HELM_CREATE_DEFAULT_RUNTIME_CLASS="true" HOST_OS="" diff --git a/tests/gha-run-k8s-common.sh b/tests/gha-run-k8s-common.sh index 3102fd03da..52dce829bd 100644 --- a/tests/gha-run-k8s-common.sh +++ b/tests/gha-run-k8s-common.sh @@ -530,8 +530,8 @@ function helm_helper() { [[ -n "${HELM_DEBUG}" ]] && yq -i ".env.debug = \"${HELM_DEBUG}\"" "${values_yaml}" [[ -n "${HELM_SHIMS}" ]] && yq -i ".env.shims = \"${HELM_SHIMS}\"" "${values_yaml}" [[ -n "${HELM_DEFAULT_SHIM}" ]] && yq -i ".env.defaultShim = \"${HELM_DEFAULT_SHIM}\"" "${values_yaml}" - [[ -n "${HELM_CREATE_RUNTIME_CLASSES}" ]] && yq -i ".env.createRuntimeClasses = \"${HELM_CREATE_RUNTIME_CLASSES}\"" "${values_yaml}" - [[ -n "${HELM_CREATE_DEFAULT_RUNTIME_CLASS}" ]] && yq -i ".env.createDefaultRuntimeClass = \"${HELM_CREATE_DEFAULT_RUNTIME_CLASS}\"" "${values_yaml}" + [[ -n "${HELM_CREATE_RUNTIME_CLASSES}" ]] && yq -i ".runtimeClasses.enabled = ${HELM_CREATE_RUNTIME_CLASSES}" "${values_yaml}" + [[ -n "${HELM_CREATE_DEFAULT_RUNTIME_CLASS}" ]] && yq -i ".runtimeClasses.createDefault = ${HELM_CREATE_DEFAULT_RUNTIME_CLASS}" "${values_yaml}" [[ -n "${HELM_ALLOWED_HYPERVISOR_ANNOTATIONS}" ]] && yq -i ".env.allowedHypervisorAnnotations = \"${HELM_ALLOWED_HYPERVISOR_ANNOTATIONS}\"" "${values_yaml}" [[ -n "${HELM_SNAPSHOTTER_HANDLER_MAPPING}" ]] && yq -i ".env.snapshotterHandlerMapping = \"${HELM_SNAPSHOTTER_HANDLER_MAPPING}\"" "${values_yaml}" [[ -n "${HELM_AGENT_HTTPS_PROXY}" ]] && yq -i ".env.agentHttpsProxy = \"${HELM_AGENT_HTTPS_PROXY}\"" "${values_yaml}"