Fixed force deleting core resources
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
1127b5fc64
commit
a6d474a93f
@ -53,9 +53,10 @@ if [ ${#POS_ARGS[@]} -lt 2 ] && [[ "${SELECTOR}" == "" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
function deleteResource() {
|
function deleteResource() {
|
||||||
echo "Deleting ${1}"
|
RES="${1//.v1/}"
|
||||||
kubectl patch -p '{"metadata":{"finalizers":null}}' --type=merge -n ${NAMESPACE} ${1} 1>/dev/null|| printf ""
|
echo "Deleting ${RES}"
|
||||||
kubectl delete -n ${NAMESPACE} ${1} 2>/dev/null || printf ""
|
kubectl patch -p '{"metadata":{"finalizers":null}}' --type=merge -n ${NAMESPACE} ${RES} 1>/dev/null|| printf ""
|
||||||
|
kubectl delete -n ${NAMESPACE} ${RES} 2>/dev/null || printf ""
|
||||||
}
|
}
|
||||||
|
|
||||||
printf "⚠️ This could leave cloud resources undeleted if finalizers aren't honoured ⚠️\n\n"
|
printf "⚠️ This could leave cloud resources undeleted if finalizers aren't honoured ⚠️\n\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user