Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2836 from haircommander/crio-kata-update-2.0
Browse files Browse the repository at this point in the history
[2.0] crio: use drop-in file to configure kata runtime
  • Loading branch information
GabyCT authored Sep 10, 2020
2 parents f186f49 + d0e04e3 commit 43845ce
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .ci/configure_crio_for_kata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ set -o pipefail
source /etc/os-release || source /usr/lib/os-release

crio_config_file="/etc/crio/crio.conf"
crio_config_dir="/etc/crio/crio.conf.d"
runc_flag="\/usr\/local\/bin\/crio-runc"
kata_flag="\/usr\/local\/bin\/containerd-shim-kata-v2"

minor_crio_version=$(crio --version | head -1 | cut -d '.' -f2)

if [ "$minor_crio_version" -ge "12" ]; then
if [ "$minor_crio_version" -ge "18" ]; then
echo "Configure runtimes map for RuntimeClass feature with drop-in configs"
echo "- Set kata as default runtime"
sudo tee -a "$crio_config_dir/99-runtime.conf" > /dev/null <<EOF
[crio.runtime]
default_runtime = "kata"
[crio.runtime.runtimes.kata]
runtime_path = "/usr/local/bin/kata-runtime"
runtime_root = "/run/vc"
runtime_type = "oci"
EOF
elif [ "$minor_crio_version" -ge "12" ]; then
echo "Configure runtimes map for RuntimeClass feature"
echo "- Set runc as default runtime"
runc_configured=$(grep -q $runc_flag $crio_config_file; echo "$?")
Expand Down

0 comments on commit 43845ce

Please # to comment.