Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit 121d39c

Browse files
committed
Allow the driver choice to persist from/to the profile
Just so after we specify it once, we don't have to keep specifying it. It might make sense to do this for the other options as well. Also, by deleting the vm *after* setting the profile, and not passing --profile, we avoid a weird error that forced us to install twice.
1 parent 0c8bbb4 commit 121d39c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

etc/scripts/install-on-minikube.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,26 @@ KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.12.0}
1919
MEMORY=${MEMORY:-8192}
2020
CPUS=${CPUS:-4}
2121
DISK_SIZE=${DISK_SIZE:-50g}
22-
VM_DRIVER=${VM_DRIVER:-virtualbox}
23-
24-
# blow away everything in the knative profile
25-
minikube delete --profile knative
22+
VM_DRIVER=${VM_DRIVER:-$(minikube config get vm-driver 2>/dev/null || echo "virtualbox")}
2623

2724
# configure knative profile
2825
minikube profile knative
2926
minikube config set kubernetes-version ${KUBERNETES_VERSION}
3027
minikube config set memory ${MEMORY}
3128
minikube config set cpus ${CPUS}
3229
minikube config set disk-size ${DISK_SIZE}
30+
minikube config set vm-driver ${VM_DRIVER}
31+
32+
# blow away everything in the knative profile
33+
minikube delete
3334

3435
# Start minikube
35-
minikube start -p knative --vm-driver $VM_DRIVER --extra-config=apiserver.enable-admission-plugins="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook"
36+
minikube start -p knative --extra-config=apiserver.enable-admission-plugins="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook"
3637

3738
if [ $? -eq 0 ]; then
3839
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
3940
"$DIR/install.sh" -q
4041
else
4142
echo "Failed to start minikube!"
42-
exit $exit_status
43+
exit -1
4344
fi

0 commit comments

Comments
 (0)