From 71b2c677471952a9cbbbfdc45e0c90f84f06022b Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Tue, 20 Aug 2024 15:31:31 -0300 Subject: [PATCH] libvirt/kcli_cluster.sh: add support to CRI-O By exporting the CONTAINER_RUNTIME=crio variable, kcli will create a k8s cluster configured CRI-O: $ export CONTAINER_RUNTIME=crio $ ./src/cloud-api-adaptor/libvirt/kcli_cluster.sh create Fixes #1981 Signed-off-by: Wainer dos Santos Moschetta --- src/cloud-api-adaptor/libvirt/kcli_cluster.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cloud-api-adaptor/libvirt/kcli_cluster.sh b/src/cloud-api-adaptor/libvirt/kcli_cluster.sh index 8242bf7964..2cb772db66 100755 --- a/src/cloud-api-adaptor/libvirt/kcli_cluster.sh +++ b/src/cloud-api-adaptor/libvirt/kcli_cluster.sh @@ -15,6 +15,7 @@ CLUSTER_NAME="${CLUSTER_NAME:-peer-pods}" CLUSTER_IMAGE="${CLUSTER_IMAGE:-ubuntu2204}" CLUSTER_VERSION="${CLUSTER_VERSION:-1.30.0}" CLUSTER_WORKERS="${CLUSTER_WORKERS:-1}" +CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-containerd}" LIBVIRT_NETWORK="${LIBVIRT_NETWORK:-default}" LIBVIRT_POOL="${LIBVIRT_POOL:-default}" @@ -53,7 +54,8 @@ create () { -P sdn=flannel \ -P nfs=false \ -P disk_size=$CLUSTER_DISK_SIZE \ - -P version=$CLUSTER_VERSION" + -P version=$CLUSTER_VERSION \ + -P engine=$CONTAINER_RUNTIME" # The autolabeller and multus images do not support s390x arch yet # disable them for s390x cluster if [[ ${TARGET_ARCH} == "s390x" ]]; then @@ -120,7 +122,8 @@ usage () { CLUSTER_VERSION (default "${CLUSTER_VERSION}") LIBVIRT_NETWORK (default "${LIBVIRT_NETWORK}") LIBVIRT_POOL (default "${LIBVIRT_POOL}") - CLUSTER_WORKERS (default "${CLUSTER_WORKERS}"). + CLUSTER_WORKERS (default "${CLUSTER_WORKERS}") + CONTAINER_RUNTIME (default "${CONTAINER_RUNTIME}". Or set to "crio") delete Delete the cluster. Specify the cluster name with CLUSTER_NAME (default "${CLUSTER_NAME}"). EOF