From 2872a2800fb0a40afabedaf7765a51ed7edbc07a Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:59:36 +1000 Subject: [PATCH] Move from a single zone to multiple zones to increase spot instance availability --- .../logos-storage-rel-tests-gcp-europe-west4/main.tf | 1 + .github/release/clusters/modules/gke/main.tf | 1 + .github/release/clusters/modules/gke/variables.tf | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/.github/release/clusters/logos-storage-rel-tests-gcp-europe-west4/main.tf b/.github/release/clusters/logos-storage-rel-tests-gcp-europe-west4/main.tf index c2a89c56..ed0f5e3e 100644 --- a/.github/release/clusters/logos-storage-rel-tests-gcp-europe-west4/main.tf +++ b/.github/release/clusters/logos-storage-rel-tests-gcp-europe-west4/main.tf @@ -20,6 +20,7 @@ module "gke" { tests_pool_name = "tests-e2-medium" tests_pool_machine_type = "e2-medium" tests_pool_max = 5 + tests_pool_zones = ["europe-west4-a", "europe-west4-b", "europe-west4-c"] tests_pool_labels = { default-pool = "false" scaling-type = "auto" diff --git a/.github/release/clusters/modules/gke/main.tf b/.github/release/clusters/modules/gke/main.tf index 09368ce3..6b3eeb47 100644 --- a/.github/release/clusters/modules/gke/main.tf +++ b/.github/release/clusters/modules/gke/main.tf @@ -39,6 +39,7 @@ resource "google_container_cluster" "this" { node_pool { name = var.tests_pool_name initial_node_count = 0 + node_locations = length(var.tests_pool_zones) > 0 ? var.tests_pool_zones : null autoscaling { min_node_count = 0 diff --git a/.github/release/clusters/modules/gke/variables.tf b/.github/release/clusters/modules/gke/variables.tf index d7b166df..587945d0 100644 --- a/.github/release/clusters/modules/gke/variables.tf +++ b/.github/release/clusters/modules/gke/variables.tf @@ -70,3 +70,9 @@ variable "tests_pool_labels" { description = "Kubernetes labels to apply to nodes in the tests pool." default = {} } + +variable "tests_pool_zones" { + type = list(string) + description = "Zones for the tests node pool. Spanning multiple zones increases spot instance availability." + default = [] +}