From 1d692898da32ce272e762a711afdfbb09a0f0032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Mon, 23 Jan 2023 16:08:24 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Bump=20up=20versions=20?= =?UTF-8?q?and=20improve=20reliability=20ot=20wait-for-nodes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prepare-tf/source/main.tf | 8 +++++--- prepare-tf/source/modules/scaleway/variables.tf | 2 +- prepare-tf/source/stage2.tmpl | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/prepare-tf/source/main.tf b/prepare-tf/source/main.tf index 53f60696..905ae56a 100644 --- a/prepare-tf/source/main.tf +++ b/prepare-tf/source/main.tf @@ -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 } } diff --git a/prepare-tf/source/modules/scaleway/variables.tf b/prepare-tf/source/modules/scaleway/variables.tf index 39e2b25f..958c2f61 100644 --- a/prepare-tf/source/modules/scaleway/variables.tf +++ b/prepare-tf/source/modules/scaleway/variables.tf @@ -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" } diff --git a/prepare-tf/source/stage2.tmpl b/prepare-tf/source/stage2.tmpl index eabea36b..bef04225 100644 --- a/prepare-tf/source/stage2.tmpl +++ b/prepare-tf/source/stage2.tmpl @@ -2,7 +2,7 @@ terraform { required_providers { kubernetes = { source = "hashicorp/kubernetes" - version = "2.7.1" + version = "2.16.1" } } }