github.com/k8snetworkplumbingwg/sriov-network-operator@v1.2.1-0.20240408194816-2d2e5a45d453/hack/undeploy.sh (about) 1 #!/bin/bash 2 #set -euxo pipefail 3 4 source "$(dirname $0)/common" 5 6 repo_dir="$(dirname $0)/.." 7 namespace=${1:-} 8 if [ -n "${namespace}" ] ; then 9 namespace="-n ${namespace}" 10 fi 11 12 pushd ${repo_dir}/deploy 13 files="operator.yaml sriovoperatorconfig.yaml service_account.yaml role.yaml role_binding.yaml clusterrole.yaml clusterrolebinding.yaml configmap.yaml" 14 for file in ${files}; do 15 envsubst< ${file} | ${OPERATOR_EXEC} delete --ignore-not-found ${namespace} -f - 16 done 17 ${OPERATOR_EXEC} delete cm --ignore-not-found ${namespace} device-plugin-config 18 ${OPERATOR_EXEC} delete MutatingWebhookConfiguration --ignore-not-found ${namespace} network-resources-injector-config sriov-operator-webhook-config 19 ${OPERATOR_EXEC} delete ValidatingWebhookConfiguration --ignore-not-found ${namespace} sriov-operator-webhook-config 20 popd