Skip to content

Commit

Permalink
Fix install script for minikube 0.24.x (Kube 1.8.0) (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Mar 29, 2018
1 parent aca5287 commit 9c2df31
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions hack/deploy/stash.sh
Expand Up @@ -59,11 +59,7 @@ export STASH_UNINSTALL=0
export STASH_PURGE=0

KUBE_APISERVER_VERSION=$(kubectl version -o=json | $ONESSL jsonpath '{.serverVersion.gitVersion}')
$ONESSL semver --check='>=1.9.0' $KUBE_APISERVER_VERSION
if [ $? -eq 0 ]; then
export STASH_ENABLE_VALIDATING_WEBHOOK=true
export STASH_ENABLE_MUTATING_WEBHOOK=true
fi
$ONESSL semver --check='<1.9.0' $KUBE_APISERVER_VERSION || { export STASH_ENABLE_VALIDATING_WEBHOOK=true; export STASH_ENABLE_MUTATING_WEBHOOK=true; }

show_help() {
echo "stash.sh - install stash operator"
Expand Down Expand Up @@ -163,8 +159,8 @@ done

if [ "$STASH_UNINSTALL" -eq 1 ]; then
# delete webhooks and apiservices
kubectl delete validatingwebhookconfiguration -l app=stash
kubectl delete mutatingwebhookconfiguration -l app=stash
kubectl delete validatingwebhookconfiguration -l app=stash || true
kubectl delete mutatingwebhookconfiguration -l app=stash || true
kubectl delete apiservice -l app=stash
# delete stash operator
kubectl delete deployment -l app=stash --namespace $STASH_NAMESPACE
Expand Down

0 comments on commit 9c2df31

Please sign in to comment.