Skip to content

Commit

Permalink
ci: add support for VM_DRIVER=podman to script/minikube.sh
Browse files Browse the repository at this point in the history
When running on AWE EC2 virtual-machines, we'll use Podman instead of
installing a VM. The "none" driver might work as well, but it requires
additional dependencies to be installed, which may change over time with
new minikube or Kubernetes releases. Hopefully the Podman driver is less
affected with changes in dependencies.

Depends-on: ceph#3419
Closes: ceph#3415
Signed-off-by: Niels de Vos <ndevos@redhat.com>
  • Loading branch information
nixpanic committed Oct 7, 2022
1 parent 5c8564c commit 4482f98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function copy_image_to_cluster() {
if [ -z "$(${CONTAINER_CMD} images -q "${build_image}")" ]; then
${CONTAINER_CMD} pull "${build_image}"
fi
if [[ "${VM_DRIVER}" == "none" ]]; then
if [[ "${VM_DRIVER}" == "none" ]] || [[ "${VM_DRIVER}" == "podman" ]]; then
${CONTAINER_CMD} tag "${build_image}" "${final_image}"
return
fi
Expand Down Expand Up @@ -185,7 +185,7 @@ K8S_FEATURE_GATES=${K8S_FEATURE_GATES:-""}
# kubelet.resolv-conf needs to point to a file, not a symlink
# the default minikube VM has /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
RESOLV_CONF='/run/systemd/resolve/resolv.conf'
if [[ "${VM_DRIVER}" == "none" ]] && [[ ! -e "${RESOLV_CONF}" ]]; then
if ( [[ "${VM_DRIVER}" == "none" ]] || [[ "${VM_DRIVER}" == "podman" ]] ) && [[ ! -e "${RESOLV_CONF}" ]]; then
# in case /run/systemd/resolve/resolv.conf does not exist, use the
# standard /etc/resolv.conf (with symlink resolved)
RESOLV_CONF="$(readlink -f /etc/resolv.conf)"
Expand Down Expand Up @@ -234,7 +234,7 @@ up)

# create a link so the default dataDirHostPath will work for this
# environment
if [[ "${VM_DRIVER}" != "none" ]]; then
if [[ "${VM_DRIVER}" != "none" ]] && [[ "${VM_DRIVER}" != "podman" ]]; then
wait_for_ssh
# shellcheck disable=SC2086
${minikube} ssh "sudo mkdir -p /mnt/${DISK}/var/lib/rook;sudo ln -s /mnt/${DISK}/var/lib/rook /var/lib/rook"
Expand Down

0 comments on commit 4482f98

Please sign in to comment.