Provide right path to the runc binary for Ubuntu and CRI-O installation.

There are also two new configuration option introduced:

- CNI_PLUGIN_DIR
- CNI_CONF_DIR

which, if defined, are used to configure crio paths for plugins and
networks config.

Change-Id: Ica4277b06740f8dca3ff5be77432cf6ab2f3cdeb
This commit is contained in:
Roman Dobosz 2021-10-27 13:58:53 +02:00
parent d4de1bb990
commit bd98565f99
2 changed files with 16 additions and 0 deletions

View File

@ -94,6 +94,20 @@ function configure_crio {
registries = ['docker.io']
EOF
fi
# CRI-O from kubic repo have placed runc in different place, not even
# in path, just to not conflict with runc package from official repo.
# We need to change it.
iniset -sudo ${crio_conf} crio.runtime.runtimes.runc runtime_path \
\"/usr/lib/cri-o-runc/sbin/runc\"
if [ -n "${CNI_CONF_DIR}" ]; then
iniset -sudo ${crio_conf} crio.network network_dir \
\"${CNI_CONF_DIR}\"
fi
if [ -n "${CNI_PLUGIN_DIR}" ]; then
iniset -sudo ${crio_conf} crio.network plugin_dir \
\"${CNI_PLUGIN_DIR}\"
fi
elif is_fedora; then
local lsb_dist=${os_VENDOR,,}

View File

@ -10,6 +10,8 @@ ENABLE_IPV6=${ENABLE_IPV6:-false}
K8S_NETWORK_ADDON=${K8S_NETWORK_ADDON:-flannel}
ENABLE_CONTAINERD_CRI=${ENABLE_CONTAINERD_CRI:-false}
CRIO_VERSION=${CRIO_VERSION:-"1.18:/1.18.0"}
CNI_CONF_DIR=${CNI_CONF_DIR:-}
CNI_PLUGIN_DIR=${CNI_PLUGIN_DIR:-}
# Enable container services
enable_service container