From a274333248b3c66c5bda36aba818c20f67695caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 26 Jul 2023 16:07:59 +0200 Subject: [PATCH] kata-deploy: Change default values of DEBUG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This can be easily done as there was no official release with the previous values. The reason we're doing so is because when using `yq` to replace the value, even when forcing `--tag '!!str' "yes"`, the content is placed without quotes, causing errors in our CI. While here, we're also removing the fallback value for DEBUG, as it is **always** set in the kata-deploy.yaml file. Signed-off-by: Fabiano FidĂȘncio --- tests/integration/kubernetes/gha-run.sh | 2 +- .../kata-deploy/kata-cleanup/base/kata-cleanup.yaml | 2 +- .../kata-deploy/kata-deploy/base/kata-deploy.yaml | 2 +- tools/packaging/kata-deploy/scripts/kata-deploy.sh | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index d6d58ac370f2..eba29008107e 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -71,7 +71,7 @@ function deploy_kata() { sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|${DOCKER_REGISTRY}/${DOCKER_REPO}:${DOCKER_TAG}|g" "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" # Enable debug for Kata Containers - yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[1].value' "\"yes\"" + yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[1].value' --tag '!!str' "true" 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[+].name' "HOST_OS" diff --git a/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml b/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml index e8b23e60fa97..9ef9e04faa14 100644 --- a/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml +++ b/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml @@ -27,7 +27,7 @@ spec: fieldRef: fieldPath: spec.nodeName - name: DEBUG - value: "no" + value: "false" - name: SHIMS value: "clh dragonball fc qemu-nvidia-gpu qemu-sev qemu-snp qemu-tdx qemu" - name: DEFAULT_SHIM diff --git a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml index 0c688b8c86d4..ccab22c3447f 100644 --- a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml +++ b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml @@ -29,7 +29,7 @@ spec: fieldRef: fieldPath: spec.nodeName - name: DEBUG - value: "no" + value: "false" - name: SHIMS value: "clh dragonball fc qemu qemu-nvidia-gpu qemu-sev qemu-snp qemu-tdx" - name: DEFAULT_SHIM diff --git a/tools/packaging/kata-deploy/scripts/kata-deploy.sh b/tools/packaging/kata-deploy/scripts/kata-deploy.sh index ae39cd6a94e7..05f1af213815 100755 --- a/tools/packaging/kata-deploy/scripts/kata-deploy.sh +++ b/tools/packaging/kata-deploy/scripts/kata-deploy.sh @@ -58,7 +58,7 @@ function install_artifacts() { chmod +x /opt/kata/runtime-rs/bin/* # Allow enabling debug for Kata Containers - if [[ "${DEBUG:-"no"}" == "yes" ]]; then + if [[ "${DEBUG}" == "true" ]]; then config_path="/opt/kata/share/defaults/kata-containers/" for shim in "${shims[@]}"; do sed -i -e 's/^#\(enable_debug\).*=.*$/\1 = true/g' "${config_path}/configuration-${shim}.toml" @@ -216,7 +216,7 @@ function configure_crio() { done - if [ "${DEBUG:-"no"}" == "yes" ]; then + if [ "${DEBUG}" == "true" ]; then cat <