diff --git a/scripts/k8s/cleanup.sh b/scripts/k8s/cleanup.sh index daa7e17048fba..b4a82657ed2ef 100755 --- a/scripts/k8s/cleanup.sh +++ b/scripts/k8s/cleanup.sh @@ -2,12 +2,12 @@ NAMESPACE="${NAMESPACE:-stackrox}" -kubectl delete namespace ${NAMESPACE} || true +kubectl delete namespace "${NAMESPACE}" || true NAMESPACE_GONE=1 until [ $NAMESPACE_GONE -eq 0 ] do - NAMESPACE_GONE=$(kubectl get namespaces -o json | jq .items[].status.phase | grep "Terminating" | wc -l) + NAMESPACE_GONE=$(kubectl get namespaces -o json | jq .items[].status.phase | grep -c "Terminating") echo -en "\rTerminating StackRox namespace.... " sleep 1 done diff --git a/scripts/style/shellcheck_skip.txt b/scripts/style/shellcheck_skip.txt index 291b83f899cf5..f6741185deab3 100644 --- a/scripts/style/shellcheck_skip.txt +++ b/scripts/style/shellcheck_skip.txt @@ -68,7 +68,6 @@ scripts/ci/sensorbundle-label/list-resources.sh scripts/connect-ui.sh scripts/ensure_image.sh scripts/grab-data-from-central.sh -scripts/k8s/cleanup.sh scripts/k8s/kill-pod.sh scripts/k8s/local-port-forward.sh scripts/mergeswag.sh