Skip to content

Commit

Permalink
Reorg objects deleted in uninstall command (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Mar 24, 2018
1 parent a2705b0 commit 56e99ef
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions hack/deploy/searchlight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,18 @@ while test $# -gt 0; do
done

if [ "$SEARCHLIGHT_UNINSTALL" -eq 1 ]; then
# delete webhooks and apiservices
kubectl delete validatingwebhookconfiguration -l app=searchlight
kubectl delete mutatingwebhookconfiguration -l app=searchlight
kubectl delete apiservice -l app=searchlight
# delete searchlight operator
kubectl delete deployment -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete service -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete secret -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete apiservice -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete validatingwebhookconfiguration -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete mutatingwebhookconfiguration -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
# Delete RBAC objects, if --rbac flag was used.
# delete RBAC objects, if --rbac flag was used.
kubectl delete serviceaccount -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete clusterrolebindings -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete clusterrole -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete clusterrolebindings -l app=searchlight
kubectl delete clusterrole -l app=searchlight
kubectl delete rolebindings -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE
kubectl delete role -l app=searchlight --namespace $SEARCHLIGHT_NAMESPACE

Expand Down

0 comments on commit 56e99ef

Please sign in to comment.