This is an automated email from the ASF dual-hosted git repository. pabloem pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push: new 9e40337388e added initial node count variable (#27011) 9e40337388e is described below commit 9e40337388e9e06caf16002b23ff5ddd5813e02a Author: Vlado Djerek <20559691+volatilemolo...@users.noreply.github.com> AuthorDate: Tue Jun 6 21:14:43 2023 +0200 added initial node count variable (#27011) Co-authored-by: vdjerek <Vlado Djerek> --- .../infrastructure/cloudbuild-manual-setup/02.builders/locals.tf | 1 + .../infrastructure/cloudbuild-manual-setup/02.builders/triggers.tf | 1 + .../infrastructure/cloudbuild-manual-setup/02.builders/variables.tf | 5 ++++- playground/terraform/infrastructure/gke/main.tf | 3 +-- playground/terraform/infrastructure/gke/variables.tf | 5 +++++ playground/terraform/infrastructure/main.tf | 1 + playground/terraform/infrastructure/variables.tf | 5 ++++- 7 files changed, 17 insertions(+), 4 deletions(-) diff --git a/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/locals.tf b/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/locals.tf index 6b3a753caed..581c7553b9c 100644 --- a/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/locals.tf +++ b/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/locals.tf @@ -32,6 +32,7 @@ locals { "TF_VAR_state_bucket=$_STATE_BUCKET", "TF_VAR_redis_name=$_REDIS_NAME", "TF_VAR_redis_tier=$_REDIS_TIER", + "TF_VAR_init_min_count=$_INIT_MIN_COUNT", "TF_VAR_min_count=$_MIN_COUNT", "TF_VAR_max_count=$_MAX_COUNT", "TF_VAR_skip_appengine_deploy=$_SKIP_APPENGINE_DEPLOY", diff --git a/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/triggers.tf b/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/triggers.tf index 0061bebf49d..59b6cdc9866 100644 --- a/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/triggers.tf +++ b/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/triggers.tf @@ -61,6 +61,7 @@ resource "google_cloudbuild_trigger" "playground_infrastructure" { _SKIP_APPENGINE_DEPLOY = var.skip_appengine_deploy _GKE_MACHINE_TYPE = var.gke_machine_type _ENVIRONMENT_NAME = var.playground_environment_name + _INIT_MIN_COUNT = var.init_min_count _MAX_COUNT = var.max_count _MIN_COUNT = var.min_count _PLAYGROUND_REGION = var.playground_region diff --git a/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/variables.tf b/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/variables.tf index be6f4b1c5e8..c4c7400850e 100644 --- a/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/variables.tf +++ b/playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/variables.tf @@ -109,7 +109,10 @@ variable "gke_machine_type" { description = "Machine type for GKE Nodes. Default: e2-standard-8" default = "e2-standard-8" } - +variable "init_min_count" { + description = "value for initial node count for GKE cluster. Default: 1" + default = 1 +} variable "max_count" { description = "Max node count for GKE cluster. Default: 4" default = 4 diff --git a/playground/terraform/infrastructure/gke/main.tf b/playground/terraform/infrastructure/gke/main.tf index b82ef9f9a29..75cccca4fef 100644 --- a/playground/terraform/infrastructure/gke/main.tf +++ b/playground/terraform/infrastructure/gke/main.tf @@ -21,7 +21,7 @@ resource "google_container_cluster" "playground-gke" { name = var.name project = var.project_id location = var.location - initial_node_count = var.min_count + initial_node_count = var.init_min_count network = var.network subnetwork = var.subnetwork remove_default_node_pool = true @@ -40,7 +40,6 @@ resource "google_container_node_pool" "playground-node-pool" { min_node_count = var.min_count max_node_count = var.max_count } - node_count = 2 management { auto_repair = "true" auto_upgrade = "true" diff --git a/playground/terraform/infrastructure/gke/variables.tf b/playground/terraform/infrastructure/gke/variables.tf index d3b27feb6b1..3d08e385443 100644 --- a/playground/terraform/infrastructure/gke/variables.tf +++ b/playground/terraform/infrastructure/gke/variables.tf @@ -59,4 +59,9 @@ variable "control_plane_cidr" { description = "CIDR block for GKE controlplane" default = "10.129.0.0/28" } +variable "init_min_count" { + description = "Initial cluster node count" + default = 1 +} + diff --git a/playground/terraform/infrastructure/main.tf b/playground/terraform/infrastructure/main.tf index 75dfab7799d..9b2877f5d9a 100644 --- a/playground/terraform/infrastructure/main.tf +++ b/playground/terraform/infrastructure/main.tf @@ -93,6 +93,7 @@ module "gke" { project_id = var.project_id service_account_email = module.setup.service_account_email machine_type = var.gke_machine_type + init_min_count = var.init_min_count min_count = var.min_count max_count = var.max_count name = var.gke_name diff --git a/playground/terraform/infrastructure/variables.tf b/playground/terraform/infrastructure/variables.tf index f3f9efe75ca..37abfbf2097 100644 --- a/playground/terraform/infrastructure/variables.tf +++ b/playground/terraform/infrastructure/variables.tf @@ -164,7 +164,10 @@ variable "gke_location" { variable "location" { description = "Location of GKE cluster" } - +variable "init_min_count" { + description = "Initial cluster node count" + default = 1 +} variable "min_count" { description = "Min cluster node count" default = 2