From 0e2a04556d52ba0c674ff0e761e121dd06e49a04 Mon Sep 17 00:00:00 2001 From: David Vossel Date: Thu, 8 Mar 2018 16:46:51 -0500 Subject: [PATCH] Handle cleanup of apiservices objects Signed-off-by: David Vossel --- cluster/clean.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster/clean.sh b/cluster/clean.sh index beb2786479b0..5120101165ff 100755 --- a/cluster/clean.sh +++ b/cluster/clean.sh @@ -34,13 +34,14 @@ _kubectl delete pods -n ${namespace} -l="kubevirt.io=virt-handler" --force --gra # Delete all traces of kubevirt namespaces=(default ${namespace}) for i in ${namespaces[@]}; do + _kubectl -n ${i} delete apiservices -l 'kubevirt.io' _kubectl -n ${i} delete deployment -l 'kubevirt.io' _kubectl -n ${i} delete rs -l 'kubevirt.io' _kubectl -n ${i} delete services -l 'kubevirt.io' _kubectl -n ${i} delete pv -l 'kubevirt.io' _kubectl -n ${i} delete pvc -l 'kubevirt.io' _kubectl -n ${i} delete ds -l 'kubevirt.io' - _kubectl -n ${i} delete crd -l 'kubevirt.io' + _kubectl -n ${i} delete customresourcedefinitions -l 'kubevirt.io' _kubectl -n ${i} delete pods -l 'kubevirt.io' _kubectl -n ${i} delete clusterrolebinding -l 'kubevirt.io' _kubectl -n ${i} delete clusterroles -l 'kubevirt.io'