Files
kubesphere/config/ks-core/scripts/post-delete.sh
KubeSphere CI Bot 0a06cd8a1b [release-4.1] fix: graceful delete ks-core (#6189)
* fix: graceful delete ks-core

Signed-off-by: joyceliu <joyceliu@yunify.com>

* fix: graceful delete ks-core

Signed-off-by: joyceliu <joyceliu@yunify.com>

---------

Signed-off-by: joyceliu <joyceliu@yunify.com>
Co-authored-by: joyceliu <joyceliu@yunify.com>
2024-09-19 18:50:09 +08:00

11 lines
438 B
Bash
Executable File

#!/usr/bin/env bash
# set -x
EXTENSION_RELATED_RESOURCES='jobs.batch roles.rbac.authorization.k8s.io rolebindings.rbac.authorization.k8s.io clusterroles.rbac.authorization.k8s.io clusterrolebindings.rbac.authorization.k8s.io'
for resource in $EXTENSION_RELATED_RESOURCES;do
echo "kubectl delete $resource -l kubesphere.io/extension-ref --all-namespaces"
kubectl delete $resource -l kubesphere.io/managed=true --all-namespaces
done