Skip to content

Commit

Permalink
Reorg objects deleted in uninstall command (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Mar 24, 2018
1 parent 8a44a74 commit 2f29b8d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions hack/deploy/stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,18 @@ while test $# -gt 0; do
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 apiservice -l app=stash
# delete stash operator
kubectl delete deployment -l app=stash --namespace $STASH_NAMESPACE
kubectl delete service -l app=stash --namespace $STASH_NAMESPACE
kubectl delete secret -l app=stash --namespace $STASH_NAMESPACE
kubectl delete validatingwebhookconfiguration -l app=stash --namespace $STASH_NAMESPACE
kubectl delete mutatingwebhookconfiguration -l app=stash --namespace $STASH_NAMESPACE
kubectl delete apiservice -l app=stash --namespace $STASH_NAMESPACE
# Delete RBAC objects, if --rbac flag was used.
# delete RBAC objects, if --rbac flag was used.
kubectl delete serviceaccount -l app=stash --namespace $STASH_NAMESPACE
kubectl delete clusterrolebindings -l app=stash --namespace $STASH_NAMESPACE
kubectl delete clusterrole -l app=stash --namespace $STASH_NAMESPACE
kubectl delete clusterrolebindings -l app=stash
kubectl delete clusterrole -l app=stash
kubectl delete rolebindings -l app=stash --namespace $STASH_NAMESPACE
kubectl delete role -l app=stash --namespace $STASH_NAMESPACE

Expand Down

0 comments on commit 2f29b8d

Please sign in to comment.