From 8181d490843f07ee0c5a629a2719ad3b3666a19f Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Tue, 22 May 2018 16:20:48 -0700 Subject: [PATCH] Delete user roles on purge. (#494) We can't use labels to delete user roles, since that will remove user permission in simple uninstall (w/o --purge flag). --- hack/deploy/stash.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hack/deploy/stash.sh b/hack/deploy/stash.sh index 0dac0f153..3e0b970c4 100755 --- a/hack/deploy/stash.sh +++ b/hack/deploy/stash.sh @@ -257,6 +257,9 @@ if [ "$STASH_UNINSTALL" -eq 1 ]; then # delete crd kubectl delete crd ${crd}.stash.appscode.com || true done + + # delete user roles + kubectl delete clusterroles appscode:stash:edit appscode:stash:view fi echo