diff --git a/tests/gha-run-k8s-common.sh b/tests/gha-run-k8s-common.sh index 01d825c284..9c1d9f9be5 100644 --- a/tests/gha-run-k8s-common.sh +++ b/tests/gha-run-k8s-common.sh @@ -224,7 +224,27 @@ function setup_crio() { curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:${crio_version}/${os}/Release.key | sudo apt-key add - curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/${os}/Release.key | sudo apt-key add - sudo apt update - sudo apt install cri-o cri-o-runc + sudo apt install -y cri-o cri-o-runc + + # We need to set the default capabilities to ensure our tests will pass + # See: https://github.com/kata-containers/kata-containers/issues/8034 + sudo mkdir -p /etc/crio/crio.conf.d/ + cat < $tmp_file"' failed with status 127 + # [bats-exec-test:38] INFO: k8s configured to use runtimeclass + # bash: line 1: $'\r': command not found + # ``` + output="$(kubectl debug -qit "${node}" --image=alpine:latest -- chroot /host bash -c "${command}" | tr -d '\r')" kubectl get pods -o name | grep node-debugger | xargs kubectl delete > /dev/null exit_code="$(echo "${output}" | tail -1)" echo "$(echo "${output}" | head -n -1)" diff --git a/tools/packaging/kata-deploy/scripts/kata-deploy.sh b/tools/packaging/kata-deploy/scripts/kata-deploy.sh index 5a19befea8..9d60a7ad04 100755 --- a/tools/packaging/kata-deploy/scripts/kata-deploy.sh +++ b/tools/packaging/kata-deploy/scripts/kata-deploy.sh @@ -75,7 +75,9 @@ function get_container_runtime() { die "invalid node name" fi - if echo "$runtime" | grep -qE 'containerd.*-k3s'; then + if echo "$runtime" | grep -qE "cri-o"; then + echo "cri-o" + elif echo "$runtime" | grep -qE 'containerd.*-k3s'; then if host_systemctl is-active --quiet rke2-agent; then echo "rke2-agent" elif host_systemctl is-active --quiet rke2-server; then