♻️ Bump up versions and improve reliability ot wait-for-nodes

This commit is contained in:
Jérôme Petazzoni
2023-01-23 16:08:24 +01:00
parent 9526a94b77
commit 1d692898da
3 changed files with 7 additions and 5 deletions

View File

@@ -62,9 +62,11 @@ resource "null_resource" "wait_for_nodes" {
KUBECONFIG = local_file.kubeconfig[each.key].filename
}
command = <<-EOT
set -e
kubectl get nodes --watch | grep --silent --line-buffered .
kubectl wait node --for=condition=Ready --all --timeout=10m
while sleep 1; do
kubectl get nodes --watch | grep --silent --line-buffered . &&
kubectl wait node --for=condition=Ready --all --timeout=10m &&
break
done
EOT
}
}

View File

@@ -56,5 +56,5 @@ variable "location" {
# scw k8s version list -o json | jq -r .[].name
variable "k8s_version" {
type = string
default = "1.23.6"
default = "1.24.7"
}

View File

@@ -2,7 +2,7 @@ terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.7.1"
version = "2.16.1"
}
}
}