mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 22:43:05 +00:00
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:
commit
48c3cec1f4
@ -32,6 +32,9 @@ function login_azure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function create_cluster() {
|
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 \
|
az aks create \
|
||||||
-g "kataCI" \
|
-g "kataCI" \
|
||||||
-n "$(_print_cluster_name)" \
|
-n "$(_print_cluster_name)" \
|
||||||
@ -142,8 +145,7 @@ function delete_cluster() {
|
|||||||
az aks delete \
|
az aks delete \
|
||||||
-g "kataCI" \
|
-g "kataCI" \
|
||||||
-n "$(_print_cluster_name)" \
|
-n "$(_print_cluster_name)" \
|
||||||
--yes \
|
--yes
|
||||||
--no-wait
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user