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.
This commit is contained in:
Alejandro Pedraza 2020-09-18 07:38:46 -05:00 committed by GitHub
parent 77a55be765
commit 51100606ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ echo "cleaning up rolebindings in kube-system namespace in k8s-context [${k8s_co
populate_array rolebindings rolebindings control-plane-ns 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 # No action if array is empty
if [[ ${rolebindings[*]} ]]; then if [[ ${rolebindings[*]} ]]; then
kubectl --context="$k8s_context" delete "${rolebindings[@]}" -n kube-system kubectl --context="$k8s_context" delete "${rolebindings[@]}" -n kube-system