Skip to content

Commit

Permalink
ci: test only change for none driver
Browse files Browse the repository at this point in the history
test only change to check everything works
fine for the none driver

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
  • Loading branch information
Madhu-1 committed Oct 7, 2022
1 parent 90dab00 commit a85765c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions scripts/minikube.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -e
set -o xtrace

#Based on ideas from https://github.com/rook/rook/blob/master/tests/scripts/minikube.sh

Expand Down Expand Up @@ -156,7 +157,7 @@ MEMORY=${MEMORY:-"4096"}
MINIKUBE_WAIT_TIMEOUT=${MINIKUBE_WAIT_TIMEOUT:-"10m"}
MINIKUBE_WAIT=${MINIKUBE_WAIT:-"all"}
CPUS=${CPUS:-"$(nproc)"}
VM_DRIVER=${VM_DRIVER:-"virtualbox"}
VM_DRIVER="none"
CNI=${CNI:-"bridge"}
NUM_DISKS=${NUM_DISKS:-"1"}
DISK_SIZE=${DISK_SIZE:-"32g"}
Expand All @@ -176,10 +177,21 @@ else
DISK_CONFIG=""
fi

EXTRA_MINIKUBE_ARGS=${EXTRA_MINIKUBE_ARGS:-"--container-runtime=cri-o"}
EXTRA_MINIKUBE_ARGS=${EXTRA_MINIKUBE_ARGS:-""}

function install_crio() {
curl -sf https://raw.githubusercontent.com/cri-o/cri-o/main/scripts/get | PREFIX=/usr bash
VERSION=1.22
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/CentOS_8/devel:kubic:libcontainers:stable.repo
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:${VERSION}.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:${VERSION}/CentOS_8/devel:kubic:libcontainers:stable:cri-o:${VERSION}.repo
dnf remove podman -y
dnf -y install dnf-plugins-core
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install jq conntrack docker-ce cri-o containerd.io cri-tools -y
systemctl daemon-reload
systemctl start docker
systemctl enable docker
mkdir -p /etc/crio/crio.conf.d
cp /etc/crio/crio.conf /etc/crio/crio.conf.d/02-crio.conf
}

# configure csi image version
Expand Down Expand Up @@ -240,7 +252,7 @@ up)
EXTRA_MINIKUBE_ARGS="${EXTRA_MINIKUBE_ARGS} --memory=${MEMORY} --cpus=${CPUS}"
fi
# shellcheck disable=SC2086
${minikube} start --force ${EXTRA_MINIKUBE_ARGS} -b kubeadm --kubernetes-version="${KUBE_VERSION}" --driver="${VM_DRIVER}" --feature-gates="${K8S_FEATURE_GATES}" --cni="${CNI}" ${EXTRA_CONFIG} --wait-timeout="${MINIKUBE_WAIT_TIMEOUT}" --wait="${MINIKUBE_WAIT}" --delete-on-failure ${DISK_CONFIG}
${minikube} start --v=5 --force ${EXTRA_MINIKUBE_ARGS} -b kubeadm --kubernetes-version="${KUBE_VERSION}" --driver="${VM_DRIVER}" --feature-gates="${K8S_FEATURE_GATES}" --cni="${CNI}" ${EXTRA_CONFIG} --wait-timeout="${MINIKUBE_WAIT_TIMEOUT}" --wait="${MINIKUBE_WAIT}" --delete-on-failure ${DISK_CONFIG}

# create a link so the default dataDirHostPath will work for this
# environment
Expand Down

0 comments on commit a85765c

Please sign in to comment.