Skip to content

Commit

Permalink
fix: update minikube configuration to run e2e tests (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomplus authored Mar 21, 2021
1 parent 38fa716 commit 7bf1100
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions scripts/kube-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,27 @@ export MINIKUBE_WANTREPORTERRORPROMPT=false
export CHANGE_MINIKUBE_NONE_USER=true
sudo mkdir -p $HOME/.kube
sudo mkdir -p $HOME/.minikube
sudo touch $HOME/.kube/config
export KUBECONFIG=$HOME/.kube/config
export MINIKUBE_HOME=$HOME
export MINIKUBE_DRIVER=${MINIKUBE_DRIVER:-none}
# Used bootstrapper to be kubeadm for the most recent k8s version
# since localkube is depreciated and only supported up to version 1.10.0
echo "Starting minikube"
sudo minikube start --vm-driver=$MINIKUBE_DRIVER --bootstrapper=kubeadm --kubernetes-version=$K8S_VERSION --logtostderr -v8 --wait=all
sudo chown -R $USER /home/runner/.minikube/
sudo --preserve-env=MINIKUBE_HOME --preserve-env=HOME minikube start --vm-driver=$MINIKUBE_DRIVER --bootstrapper=kubeadm --kubernetes-version=$K8S_VERSION --logtostderr -v8 --wait=all

# Update ownership for configs/certs
sudo chown -R $USER /home/runner/.minikube /home/runner/.kube

echo "Dump kube config"
kubectl config view

# check if kubectl can access the api server that Minikube has created
kubectl get po &> /dev/null
if [ $? -eq 1 ]; then
sudo minikube logs
die $LINENO "minikube did not start"
break
echo "minikube did not start"
exit 1
fi

echo "Dump kube config"
kubectl config view

echo "Dump Kubernetes Objects..."
kubectl get componentstatuses
kubectl get configmaps
Expand Down

0 comments on commit 7bf1100

Please sign in to comment.