diff --git a/dev/preview/infrastructure/modules/gce/vm.tf b/dev/preview/infrastructure/modules/gce/vm.tf index 4a1db797065ac9..d67b6b2363fe2f 100644 --- a/dev/preview/infrastructure/modules/gce/vm.tf +++ b/dev/preview/infrastructure/modules/gce/vm.tf @@ -77,7 +77,8 @@ resource "google_compute_address" "static-preview-ip" { locals { vm_name = "preview-${var.preview_name}" bootstrap_script = templatefile("${path.module}/../../scripts/bootstrap-k3s.sh", { - vm_name = local.vm_name + vm_name = local.vm_name + preview_name = var.preview_name }) trustmanager_script = file("${path.module}/../../scripts/install-trustmanager.sh") diff --git a/dev/preview/infrastructure/scripts/bootstrap-k3s.sh b/dev/preview/infrastructure/scripts/bootstrap-k3s.sh index bcaaa05cfdfda3..069c6d5ec87975 100755 --- a/dev/preview/infrastructure/scripts/bootstrap-k3s.sh +++ b/dev/preview/infrastructure/scripts/bootstrap-k3s.sh @@ -9,6 +9,7 @@ export INSTALL_K3S_SKIP_DOWNLOAD=true SERVICE_DNS_IP="$(hostname -I | cut -d ' ' -f1)" export SERVICE_DNS_IP +# shellcheck disable=SC2154 /usr/local/bin/install-k3s.sh \ --token "1234" \ --node-ip "$SERVICE_DNS_IP" \ @@ -24,6 +25,7 @@ export SERVICE_DNS_IP --kubelet-arg cgroup-driver=systemd \ --kubelet-arg feature-gates=LocalStorageCapacityIsolationFSQuotaMonitoring=true \ --kube-apiserver-arg feature-gates=LocalStorageCapacityIsolationFSQuotaMonitoring=true \ + --tls-san "${preview_name}.preview.gitpod-dev.com" \ --cluster-init # Seems like this is a bit flaky now, with k3s not always being ready, and the labeling