From 92937f0081fb296eef0e6644bd3fd8241e51ea79 Mon Sep 17 00:00:00 2001 From: phaer Date: Fri, 11 Feb 2022 22:47:57 +0100 Subject: [PATCH] cleanup first control plane provisioning... * move yaml to subdirectory of /tmp * reformat loop waiting for /readyz endpoint * add logging message * split provisioner because sensitive var.hcloud_token prohibits log output --- master.tf | 27 ++++++++++++++++++--------- templates/kustomization.yaml.tpl | 1 + 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/master.tf b/master.tf index b75b6c9..59c2d71 100644 --- a/master.tf +++ b/master.tf @@ -70,13 +70,13 @@ resource "hcloud_server" "first_control_plane" { # Upload kustomization.yaml, containing Hetzner CSI & CSM, as well as kured. provisioner "file" { content = local.post_install_kustomization - destination = "/tmp/kustomization.yaml" + destination = "/tmp/post_install/kustomization.yaml" } # Upload traefik config provisioner "file" { content = local.traefik_config - destination = "/tmp/traefik.yaml" + destination = "/tmp/post_install/traefik.yaml" } # Run the first control plane @@ -95,15 +95,24 @@ resource "hcloud_server" "first_control_plane" { echo "Initiating the cluster..." sleep 2 done + timeout 120 bash <