mirror of https://github.com/linkerd/linkerd2.git
20 lines
420 B
Bash
Executable File
20 lines
420 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
linkerd_namespace=$1
|
|
|
|
if [ -z "$linkerd_namespace" ]; then
|
|
echo "usage: $(basename "$0") <namespace>" >&2
|
|
exit 64
|
|
fi
|
|
|
|
echo "cleaning up namespace [${linkerd_namespace}] and associated test namespaces"
|
|
|
|
if ! namespaces=$(kubectl get ns -oname | grep -E "/$linkerd_namespace(-|$)"); then
|
|
echo "no namespaces found for [$linkerd_namespace]" >&2
|
|
exit 1
|
|
else
|
|
kubectl delete $namespaces
|
|
fi
|