From 51100606ca27f65a981a54728238eeb0c251b410 Mon Sep 17 00:00:00 2001 From: Alejandro Pedraza Date: Fri, 18 Sep 2020 07:38:46 -0500 Subject: [PATCH] Delete multicluster resources in `bin/test-cleanup` (#4983) When some test failed in the middle of the `./tests/integration/install_test.go` suite, multicluster resources can be left-over, which `./bin/test-cleanup` wasn't removing. This was affecting the ARM integration tests, that require good cleanup since they use a non-transient cluster. --- bin/test-cleanup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/test-cleanup b/bin/test-cleanup index 3b1a320d0..fd8c59562 100755 --- a/bin/test-cleanup +++ b/bin/test-cleanup @@ -83,6 +83,9 @@ echo "cleaning up rolebindings in kube-system namespace in k8s-context [${k8s_co populate_array rolebindings rolebindings control-plane-ns +echo "cleaning up multicluster resources, if present [${k8s_context}]" +linkerd mc uninstall 2> /dev/null | kubectl --context="$k8s_context" delete -f - + # No action if array is empty if [[ ${rolebindings[*]} ]]; then kubectl --context="$k8s_context" delete "${rolebindings[@]}" -n kube-system