delete webhook configs using script (#2966)

This commit is contained in:
Dennis Adjei-Baah 2019-06-20 09:45:11 -07:00 committed by GitHub
parent 435fe861d0
commit 84fbd7fc08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -24,12 +24,12 @@ if ! clusterroles=$(kubectl --context=$k8s_context get clusterroles -oname | gre
echo "no clusterroles found for [$linkerd_namespace]" >&2
fi
if ! webhookconfigs=$(kubectl --context=$k8s_context get mutatingwebhookconfigurations -oname | grep -E "/linkerd-$linkerd_namespace(-|$)"); then
echo "no mutatingwebhookconfigurations found for [$linkerd_namespace]" >&2
if ! webhookconfigs=$(kubectl --context=$k8s_context get mutatingwebhookconfigurations -oname | grep -E "/linkerd(-|$)"); then
echo "no mutatingwebhookconfigurations found" >&2
fi
if ! validatingconfigs=$(kubectl --context=$k8s_context get validatingwebhookconfigurations -oname | grep -E "/linkerd-$linkerd_namespace(-|$)"); then
echo "no validatingwebhookconfigurations found for [$linkerd_namespace]" >&2
if ! validatingconfigs=$(kubectl --context=$k8s_context get validatingwebhookconfigurations -oname | grep -E "/linkerd(-|$)"); then
echo "no validatingwebhookconfigurations found" >&2
fi
if [[ $namespaces || $clusterrolebindings || $clusterroles || $webhookconfigs || $validatingconfigs ]]; then