kata-deploy: Improve the logic for linking to the rust runtime

This change for now doesn't do much, apart from making it easier to
expand which runtimes should be linked to the runtime-rs containerd shim
binary.

Also, this matches the logic used for the config files.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-11-23 10:16:29 +01:00
parent fc28deee0e
commit d4e00238ab

View File

@ -244,11 +244,15 @@ function configure_different_shims_base() {
backup_shim "${shim_file}"
if [[ "${shim}" == "dragonball" ]]; then
ln -sf /opt/kata/runtime-rs/bin/containerd-shim-kata-v2 "${shim_file}"
else
ln -sf /opt/kata/bin/containerd-shim-kata-v2 "${shim_file}"
fi
# Map the runtime shim name to the appropriate
# containerd-shim-kata-v2 binary
case "$shim" in
dragonball)
ln -sf /opt/kata/runtime-rs/bin/containerd-shim-kata-v2 "${shim_file}" ;;
*)
ln -sf /opt/kata/bin/containerd-shim-kata-v2 "${shim_file}" ;;
esac
chmod +x "$shim_file"
if [ "${shim}" == "${default_shim}" ]; then