From cd6a84cfc5fbfbe98dc7cc4b6aab9a3cd8cb8e4e Mon Sep 17 00:00:00 2001 From: ChengyuZhu6 Date: Thu, 8 Feb 2024 16:17:56 +0800 Subject: [PATCH] kata-deploy: Setting up snapshotters per runtime handler Setting up snapshotters per runtime handler as the commit (https://github.com/kata-containers/kata-containers/pull/8655/commits/6cc6ca5a7fe1c6f074140295293e641a2dec7735) described. Signed-off-by: ChengyuZhu6 --- tests/integration/kubernetes/gha-run.sh | 4 ++++ tools/packaging/kata-deploy/scripts/kata-deploy.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index 5d2afbb34e..864afbe799 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -147,6 +147,10 @@ function deploy_kata() { # Enable 'default_vcpus' hypervisor annotation yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[6].value' "default_vcpus" + if [ -n "${SNAPSHOTTER}" ]; then + yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[7].value' "${KATA_HYPERVISOR}:${SNAPSHOTTER}" + fi + if [ "${KATA_HOST_OS}" = "cbl-mariner" ]; then yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[6].value' "initrd kernel default_vcpus" yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[+].name' "HOST_OS" diff --git a/tools/packaging/kata-deploy/scripts/kata-deploy.sh b/tools/packaging/kata-deploy/scripts/kata-deploy.sh index 8253c00ae0..b208d0f577 100755 --- a/tools/packaging/kata-deploy/scripts/kata-deploy.sh +++ b/tools/packaging/kata-deploy/scripts/kata-deploy.sh @@ -501,6 +501,7 @@ function main() { echo "* CREATE_RUNTIMECLASSES: ${CREATE_RUNTIMECLASSES}" echo "* CREATE_DEFAULT_RUNTIMECLASS: ${CREATE_DEFAULT_RUNTIMECLASS}" echo "* ALLOWED_HYPERVISOR_ANNOTATIONS: ${ALLOWED_HYPERVISOR_ANNOTATIONS}" + echo "* SNAPSHOTTER_HANDLER_MAPPING: ${SNAPSHOTTER_HANDLER_MAPPING}" # script requires that user is root euid=$(id -u)