Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete helm release #1393

Merged
merged 1 commit into from Apr 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions scripts/kubesphere-delete.sh
Expand Up @@ -151,12 +151,13 @@ done
kubectl delete users --all 2>/dev/null


# delete helmcategories
for helmcategory in `kubectl get helmcategories.application.kubesphere.io -o jsonpath="{.items[*].metadata.name}"`
do
kubectl patch helmcategories.application.kubesphere.io $helmcategory -p '{"metadata":{"finalizers":null}}' --type=merge
# delete helm resources
for resource_type in `echo helmcategories helmapplications helmapplicationversions helmrepos helmreleases`; do
for resource_name in `kubectl get ${resource_type}.application.kubesphere.io -o jsonpath="{.items[*].metadata.name}"`; do
kubectl patch ${resource_type}.application.kubesphere.io ${resource_name} -p '{"metadata":{"finalizers":null}}' --type=merge
done
kubectl delete ${resource_type}.application.kubesphere.io --all 2>/dev/null
done
kubectl delete helmcategories.application.kubesphere.io --all 2>/dev/null

# delete workspacetemplates
for workspacetemplate in `kubectl get workspacetemplates.tenant.kubesphere.io -o jsonpath="{.items[*].metadata.name}"`
Expand Down