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 ed474479..1413c0d1 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 @@ -5,6 +5,7 @@ module "gke" { name = "logos-storage-rel-tests" project = var.project region = var.region + zone = var.zone kubernetes_release_channel = "STABLE" node_pool_name = "infra-e2-standard-4" node_pool_machine_type = "e2-standard-4" @@ -21,7 +22,7 @@ module "gke" { resource "google_container_node_pool" "runners-ci" { name = "runners-ci-e2-standard-2" cluster = module.gke.kubernetes_cluster_id - location = var.region + location = var.zone project = var.project autoscaling { @@ -47,7 +48,7 @@ resource "google_container_node_pool" "runners-ci" { resource "google_container_node_pool" "tests-pods" { name = "tests-e2-medium" cluster = module.gke.kubernetes_cluster_id - location = var.region + location = var.zone project = var.project autoscaling { diff --git a/.github/release/clusters/logos-storage-rel-tests-gcp-europe-west4/variables.tf b/.github/release/clusters/logos-storage-rel-tests-gcp-europe-west4/variables.tf index 8dd91afb..2413197c 100644 --- a/.github/release/clusters/logos-storage-rel-tests-gcp-europe-west4/variables.tf +++ b/.github/release/clusters/logos-storage-rel-tests-gcp-europe-west4/variables.tf @@ -7,3 +7,8 @@ variable "region" { description = "GCP region (e.g. europe-west4)" type = string } + +variable "zone" { + description = "GCP zone for the cluster (e.g. europe-west4-b)" + type = string +} diff --git a/.github/release/clusters/modules/gke/main.tf b/.github/release/clusters/modules/gke/main.tf index daa26709..4a00adf3 100644 --- a/.github/release/clusters/modules/gke/main.tf +++ b/.github/release/clusters/modules/gke/main.tf @@ -1,7 +1,7 @@ # Kubernetes cluster resource "google_container_cluster" "this" { name = local.name - location = var.region + location = var.zone project = var.project # Create an empty cluster — all node pools are managed as separate resources @@ -28,7 +28,7 @@ resource "google_container_cluster" "this" { resource "google_container_node_pool" "default" { name = var.node_pool_name cluster = google_container_cluster.this.id - location = var.region + location = var.zone project = var.project autoscaling { diff --git a/.github/release/clusters/modules/gke/variables.tf b/.github/release/clusters/modules/gke/variables.tf index cab525ca..094b17fd 100644 --- a/.github/release/clusters/modules/gke/variables.tf +++ b/.github/release/clusters/modules/gke/variables.tf @@ -11,7 +11,12 @@ variable "project" { variable "region" { type = string - description = "The GCP region for the cluster (regional cluster spans 3 zones)." + description = "The GCP region (used for the provider and node pool location)." +} + +variable "zone" { + type = string + description = "The GCP zone for the cluster. Using a single zone avoids the longer provisioning time of a regional (multi-zone) cluster." } # Kubernetes Control Plane diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4d2acd6..5473e43a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -211,6 +211,7 @@ jobs: env: TF_VAR_project: ${{ secrets.RELEASE_TESTS_GCP_PROJECT }} TF_VAR_region: europe-west4 + TF_VAR_zone: europe-west4-b STORAGEDOCKERIMAGE: ${{ needs.build-docker-dist-tests.outputs.logos_storage_image }} TEST_TYPE: release-tests BRANCH: ${{ inputs.branch || 'master' }} @@ -249,7 +250,7 @@ jobs: - name: Get kubeconfig run: | gcloud container clusters get-credentials logos-storage-rel-tests-gcp-europe-west4 \ - --region europe-west4 \ + --zone europe-west4-b \ --project ${{ secrets.RELEASE_TESTS_GCP_PROJECT }} - name: Create in-cluster app kubeconfig secret