Skip to content

Commit

Permalink
libvirt/kcli_cluster.sh: add support to CRI-O
Browse files Browse the repository at this point in the history
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 confidential-containers#1981
Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
  • Loading branch information
wainersm committed Sep 27, 2024
1 parent 8c2fbf6 commit 71b2c67
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cloud-api-adaptor/libvirt/kcli_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 71b2c67

Please sign in to comment.