Merge pull request #7243 from sprt/ensure-cluster-no-exist

gha: k8s: Ensure cluster doesn't exist before creating it
This commit is contained in:
Fabiano Fidêncio 2023-07-07 14:03:41 +02:00 committed by GitHub
commit 48c3cec1f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,9 @@ function login_azure() {
}
function create_cluster() {
# First, ensure that the cluster didn't fail to get cleaned up from a previous run.
delete_cluster || true
az aks create \
-g "kataCI" \
-n "$(_print_cluster_name)" \
@ -142,8 +145,7 @@ function delete_cluster() {
az aks delete \
-g "kataCI" \
-n "$(_print_cluster_name)" \
--yes \
--no-wait
--yes
}
function main() {