Skip to content

Commit a688be9

Browse files
committed
delete kind cluster after tests run
Signed-off-by: Mucahit Kurt <[email protected]>
1 parent 4fcafec commit a688be9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

prow.sh

+10
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,14 @@ EOF
580580
export KUBECONFIG
581581
}
582582

583+
# Deletes kind cluster
584+
delete_cluster() {
585+
if kind get clusters | grep -q csi-prow; then
586+
run kind delete cluster --name=csi-prow || die "kind delete failed"
587+
fi
588+
unset KUBECONFIG
589+
}
590+
583591
# Looks for the deployment as specified by CSI_PROW_DEPLOYMENT and CSI_PROW_KUBERNETES_VERSION
584592
# in the given directory.
585593
find_deployment () {
@@ -1017,6 +1025,7 @@ main () {
10171025
fi
10181026
fi
10191027
fi
1028+
delete_cluster
10201029
fi
10211030

10221031
if tests_need_alpha_cluster && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then
@@ -1047,6 +1056,7 @@ main () {
10471056
fi
10481057
fi
10491058
fi
1059+
delete_cluster
10501060
fi
10511061
fi
10521062

0 commit comments

Comments
 (0)