diff --git a/cluster-up/cluster/kind-k8s-sriov-1.17.0/provider.sh b/cluster-up/cluster/kind-k8s-sriov-1.17.0/provider.sh index 22d49f0b35..9ca083d62d 100755 --- a/cluster-up/cluster/kind-k8s-sriov-1.17.0/provider.sh +++ b/cluster-up/cluster/kind-k8s-sriov-1.17.0/provider.sh @@ -19,6 +19,9 @@ function up() { cp $KIND_MANIFESTS_DIR/kind.yaml ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml + export ETCD_DATA_DIR="/mnt/etcd" + ensure_memory_dir_for_etcd_data + kind_up ${KUBEVIRTCI_PATH}/cluster/$KUBEVIRT_PROVIDER/config_sriov.sh diff --git a/cluster-up/cluster/kind/common.sh b/cluster-up/cluster/kind/common.sh index c1102f3b76..e722a42b2f 100755 --- a/cluster-up/cluster/kind/common.sh +++ b/cluster-up/cluster/kind/common.sh @@ -270,7 +270,20 @@ EOF done } +function _add_control_plane_extra_mounts() { + if [[ "$KUBEVIRT_PROVIDER" =~ sriov.* ]]; then + if [ "$ETCD_DATA_DIR" != none ]; then + cat <> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml + extraMounts: + - containerPath: /var/lib/etcd + hostPath: $ETCD_DATA_DIR +EOF + fi + fi +} + function _prepare_kind_config() { + _add_control_plane_extra_mounts _add_workers echo "Final KIND config:"