You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2022/12/19 21:05:28 UTC

[beam] branch master updated: [Playground]GKE autoscaling nodes (#24593)

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 e1a00f07591 [Playground]GKE autoscaling nodes (#24593)
e1a00f07591 is described below

commit e1a00f07591a9eced8a1565a93dfb05a4082e1aa
Author: MakarkinSAkvelon <67...@users.noreply.github.com>
AuthorDate: Tue Dec 20 02:05:17 2022 +0500

    [Playground]GKE autoscaling nodes (#24593)
    
    * Healthcheck was added
    
    * Autoscaling
    
    * License information was added
    
    * Move healthcheck vars to value.yaml
    
    * remove unused values
    
    * Resources limits were corrected
    
    * gke-autoscaling
    
    * var fix
    
    * var fix
    
    * var fix
    
    * var fix
    
    * var fix
    
    * update gke creation
    
    * add location to GKE
    
    * fix gke
    
    * minor changes for helm
    
    * Readme update
    
    * unused variables were removed
    
    * fix values in deployment
    
    * Change parallel job for GO
    
    * gradle fix
    
    * Update gradle task
    
    * Change REDIS
    
    * update helm
    
    * "terraformRef" task 'region' var added (CB issue fix)
    
    * Readme fix
    
    * remove unused vars
    
    * Remove unused file
    
    * remove unused folder
    
    * Add sdk to command
    
    * fix README file
    
    Co-authored-by: Sergey Makarkin <se...@akvelon.com>
    Co-authored-by: ruslan-ikhsan <ru...@akvelon.com>
---
 .../templates/autoscaling-scio.yaml                |  2 +-
 .../templates/deployment-frontend.yml              | 12 ++---
 .../helm-playground/templates/deployment-go.yml    | 18 +++----
 .../helm-playground/templates/deployment-java.yml  | 14 ++---
 .../templates/deployment-python.yml                | 16 +++---
 .../templates/deployment-router.yml                | 14 ++---
 .../helm-playground/templates/deployment-scio.yml  | 16 +++---
 .../infrastructure/helm-playground/values.yaml     |  2 +-
 playground/terraform/README.md                     |  8 ++-
 playground/terraform/build.gradle.kts              | 60 ++++++++++++----------
 playground/terraform/infrastructure/gke/main.tf    | 34 ++++++++----
 .../terraform/infrastructure/gke/variables.tf      | 16 +++---
 playground/terraform/infrastructure/main.tf        |  3 +-
 .../infrastructure/memorystore/variables.tf        |  2 +-
 playground/terraform/infrastructure/variables.tf   | 15 ++++--
 playground/terraform/main.tf                       |  1 -
 playground/terraform/variables.tf                  | 26 ++++------
 17 files changed, 141 insertions(+), 118 deletions(-)

diff --git a/playground/infrastructure/helm-playground/templates/autoscaling-scio.yaml b/playground/infrastructure/helm-playground/templates/autoscaling-scio.yaml
index ad370c7fa19..c62f09bb8a1 100644
--- a/playground/infrastructure/helm-playground/templates/autoscaling-scio.yaml
+++ b/playground/infrastructure/helm-playground/templates/autoscaling-scio.yaml
@@ -18,7 +18,7 @@ metadata:
   name: playground-scio
 spec:
   maxReplicas: 10
-  minReplicas: 1
+  minReplicas: 2
   scaleTargetRef:
     apiVersion: apps/v1
     kind: Deployment
diff --git a/playground/infrastructure/helm-playground/templates/deployment-frontend.yml b/playground/infrastructure/helm-playground/templates/deployment-frontend.yml
index 2da99734187..fa0f4916e00 100644
--- a/playground/infrastructure/helm-playground/templates/deployment-frontend.yml
+++ b/playground/infrastructure/helm-playground/templates/deployment-frontend.yml
@@ -37,15 +37,15 @@ spec:
        livenessProbe:
          httpGet:
            path: /liveness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.livInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.livPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.livInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.livPeriodSeconds }}
        readinessProbe:
          httpGet:
            path: /readiness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.readInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.readPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.readInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.readPeriodSeconds }}
        resources:
          requests:
            memory: "50Mi"
diff --git a/playground/infrastructure/helm-playground/templates/deployment-go.yml b/playground/infrastructure/helm-playground/templates/deployment-go.yml
index f592c180146..a9c9b4ecd79 100644
--- a/playground/infrastructure/helm-playground/templates/deployment-go.yml
+++ b/playground/infrastructure/helm-playground/templates/deployment-go.yml
@@ -40,27 +40,27 @@ spec:
          - name: CACHE_ADDRESS
            value: {{ .Values.redis_ip }}
          - name: NUM_PARALLEL_JOBS
-           value: "5"
+           value: "10"
        livenessProbe:
          httpGet:
            path: /liveness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.livInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.livPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.livInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.livPeriodSeconds }}
        readinessProbe:
          httpGet:
            path: /readiness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.readInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.readPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.readInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.readPeriodSeconds }}
        resources:
          requests:
            memory: "1000Mi"
            cpu: "250m"
          limits: 
            cpu: "500"
-           memory: "500Mi"
+           memory: "1000Mi"
   replicas: {{ .Values.replicaCount  }}
   selector:
     matchLabels:
-     app: backend-go
+     app: backend-go
\ No newline at end of file
diff --git a/playground/infrastructure/helm-playground/templates/deployment-java.yml b/playground/infrastructure/helm-playground/templates/deployment-java.yml
index 94749e77467..4ee1c485f86 100644
--- a/playground/infrastructure/helm-playground/templates/deployment-java.yml
+++ b/playground/infrastructure/helm-playground/templates/deployment-java.yml
@@ -43,15 +43,15 @@ spec:
        livenessProbe:
          httpGet:
            path: /liveness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.livInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.livPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.livInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.livPeriodSeconds }}
        readinessProbe:
          httpGet:
            path: /readiness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.readInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.readPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.readInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.readPeriodSeconds }}
        resources:
          requests:
            memory: "1000Mi"
@@ -62,4 +62,4 @@ spec:
   replicas: {{ .Values.replicaCount  }}
   selector:
     matchLabels:
-     app: backend-java
+     app: backend-java
\ No newline at end of file
diff --git a/playground/infrastructure/helm-playground/templates/deployment-python.yml b/playground/infrastructure/helm-playground/templates/deployment-python.yml
index a884630c4aa..85fdecfc6d0 100644
--- a/playground/infrastructure/helm-playground/templates/deployment-python.yml
+++ b/playground/infrastructure/helm-playground/templates/deployment-python.yml
@@ -39,19 +39,19 @@ spec:
         - name: CACHE_ADDRESS
           value: {{ .Values.redis_ip }}
         - name: NUM_PARALLEL_JOBS
-          value: "5"
+          value: "20"
        livenessProbe:
          httpGet:
            path: /liveness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.livInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.livPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.livInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.livPeriodSeconds }}
        readinessProbe:
          httpGet:
            path: /readiness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.readInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.readPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.readInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.readPeriodSeconds }}
        resources:
          requests:
            memory: "1000Mi"
@@ -62,4 +62,4 @@ spec:
   replicas: {{ .Values.replicaCount  }}
   selector:
     matchLabels:
-     app: backend-python
+     app: backend-python
\ No newline at end of file
diff --git a/playground/infrastructure/helm-playground/templates/deployment-router.yml b/playground/infrastructure/helm-playground/templates/deployment-router.yml
index ad826240125..710c2c3332c 100644
--- a/playground/infrastructure/helm-playground/templates/deployment-router.yml
+++ b/playground/infrastructure/helm-playground/templates/deployment-router.yml
@@ -45,15 +45,15 @@ spec:
        livenessProbe:
          httpGet:
            path: /liveness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.livInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.livPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.livInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.livPeriodSeconds }}
        readinessProbe:
          httpGet:
            path: /readiness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.readInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.readPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.readInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.readPeriodSeconds }}
        resources:
          requests:
            memory: "50Mi"
@@ -64,4 +64,4 @@ spec:
   replicas: {{ .Values.replicaCount  }}
   selector:
     matchLabels:
-     app: backend-router
+     app: backend-router
\ No newline at end of file
diff --git a/playground/infrastructure/helm-playground/templates/deployment-scio.yml b/playground/infrastructure/helm-playground/templates/deployment-scio.yml
index ee2c6e15e64..19421b014e8 100644
--- a/playground/infrastructure/helm-playground/templates/deployment-scio.yml
+++ b/playground/infrastructure/helm-playground/templates/deployment-scio.yml
@@ -42,23 +42,23 @@ spec:
        livenessProbe:
          httpGet:
            path: /liveness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.livInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.livPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.livInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.livPeriodSeconds }}
        readinessProbe:
          httpGet:
            path: /readiness
-           port: {{ .Value.healthcheck.port }}
-         initialDelaySeconds: {{ .Value.healthcheck.readInitialDelaySeconds }}
-         periodSeconds: {{ .Value.healthcheck.readPeriodSeconds }}
+           port: {{ .Values.healthcheck.port }}
+         initialDelaySeconds: {{ .Values.healthcheck.readInitialDelaySeconds }}
+         periodSeconds: {{ .Values.healthcheck.readPeriodSeconds }}
        resources:
          requests:
            memory: "1000Mi"
            cpu: "500m"
          limits:
            cpu: "1000"
-           memory: "500Mi"
+           memory: "1500Mi"
   replicas: {{ .Values.replicaCount  }}
   selector:
     matchLabels:
-     app: backend-scio
+     app: backend-scio
\ No newline at end of file
diff --git a/playground/infrastructure/helm-playground/values.yaml b/playground/infrastructure/helm-playground/values.yaml
index 81fae537345..c051dd117f9 100644
--- a/playground/infrastructure/helm-playground/values.yaml
+++ b/playground/infrastructure/helm-playground/values.yaml
@@ -30,4 +30,4 @@ healthcheck:
    livInitialDelaySeconds: 30
    livPeriodSeconds: 30
    readInitialDelaySeconds: 30
-   readPeriodSeconds: 30
\ No newline at end of file
+   readPeriodSeconds: 30    
\ No newline at end of file
diff --git a/playground/terraform/README.md b/playground/terraform/README.md
index 2e1449723d6..a89a745a7f3 100644
--- a/playground/terraform/README.md
+++ b/playground/terraform/README.md
@@ -68,6 +68,10 @@ gke_name             = "playground-backend"  #Playground GKE Cluster name
 region               = "us-east1"            #Set the deployment region
 location             = "us-east1-b"          #Select the deployment location from available in the specified region
 state_bucket         = "bucket_name"         #GCS bucket name for Beam Playground temp files
+redis_name           = "playground_redis"    #Choose the name for redis instance
+min_count            = 2                     #Min node count for GKE cluster
+max_count            = 6                     #Max node count for GKE cluster
+
 ```
 * `state.tfbackend` environment variables:
 ```
@@ -112,9 +116,9 @@ gcloud container clusters get-credentials --region `chosen_location` `gke_name`
 ```
 Start the following command from the top level repository folder ("beam") to deploy the Payground infrastructure:
 ```
-./gradlew playground:terraform:gkebackend -Pproject_environment="environment_name" -Pdocker-tag="tag" -Pdns-name="playground.zone"
+./gradlew playground:terraform:gkebackend -Pproject_environment="environment_name" -Pdocker-tag="tag" -Pdns-name="playground.zone" -Psdk-tag=2.43.0
 ```
-Where tag - image tag for backend, playground.zone - chosen DNS for Playground
+Where tag - image tag for backend, playground.zone - chosen DNS for Playground, Psdk-tag - current BEAM version
 
 During script execution, a Google managed certificate will be created. [Provisioning might take up to 60 minutes](https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs).
 
diff --git a/playground/terraform/build.gradle.kts b/playground/terraform/build.gradle.kts
index cb3241ebf7b..93318d18257 100644
--- a/playground/terraform/build.gradle.kts
+++ b/playground/terraform/build.gradle.kts
@@ -40,8 +40,6 @@ val licenseText = "#############################################################
 
 plugins {
     id("com.pswidersk.terraform-plugin") version "1.0.0"
-    id("org.unbroken-dome.helm") version "1.7.0"
-    id("org.unbroken-dome.helm-releases") version "1.7.0"
 }
 
 terraformPlugin {
@@ -72,6 +70,7 @@ tasks {
         mustRunAfter(":playground:terraform:terraformInit")
         var project_id = "unknown"
         var environment = "unknown"
+        var region = "unknown"
         if (project.hasProperty("project_id")) {
             project_id = project.property("project_id") as String
         }
@@ -83,6 +82,7 @@ tasks {
             "-lock=false",
             "-var=project_id=$project_id",
             "-var=environment=$environment",
+            "-var=region=$region",
             if (file("./environment/$environment/terraform.tfvars").exists()) {
                 "-var-file=./environment/$environment/terraform.tfvars"
             } else {
@@ -465,34 +465,38 @@ dns_name: ${dns_name}
  }
 }
 
-helm {
-    val playground by charts.creating {
-        chartName.set("playground")
-        sourceDir.set(file("../infrastructure/helm-playground"))
-    }
-    releases {
-        create("playground") {
-            from(playground)
-        }
+tasks.register("helmRelease") {
+    group = "deploy"
+    val modulePath = project(":playground").projectDir.absolutePath
+    val hdir = File("$modulePath/infrastructure/helm-playground/")
+    doLast{
+    exec {
+        executable("helm")
+    args("install", "playground", "$hdir")
     }
+   }
 }
 tasks.register("gkebackend") {
   group = "deploy"
-  val init = tasks.getByName("terraformInit")
-  val takeConfig = tasks.getByName("takeConfig")
-  val back = tasks.getByName("pushBack")
-  val front = tasks.getByName("pushFront")
-  val indexcreate = tasks.getByName("indexcreate")
-  val helm = tasks.getByName("helmInstallPlayground")
-  dependsOn(init)
-  dependsOn(takeConfig)
-  dependsOn(back)
-  dependsOn(front)
-  dependsOn(indexcreate)
-  dependsOn(helm)
-  takeConfig.mustRunAfter(init)
-  back.mustRunAfter(takeConfig)
-  front.mustRunAfter(back)
-  indexcreate.mustRunAfter(front)
-  helm.mustRunAfter(indexcreate)
+  val initTask = tasks.getByName("terraformInit")
+  val docRegTask = tasks.getByName("setDockerRegistry")
+  val takeConfigTask = tasks.getByName("takeConfig")
+  val pushBackTask = tasks.getByName("pushBack")
+  val pushFrontTask = tasks.getByName("pushFront")
+  val indexcreateTask = tasks.getByName("indexcreate")
+  val helmTask = tasks.getByName("helmRelease")
+  dependsOn(initTask)
+  dependsOn(docRegTask)
+  dependsOn(takeConfigTask)
+  dependsOn(pushBackTask)
+  dependsOn(pushFrontTask)
+  dependsOn(indexcreateTask)
+  dependsOn(helmTask)
+  docRegTask.mustRunAfter(initTask)
+  takeConfigTask.mustRunAfter(docRegTask)
+  pushBackTask.mustRunAfter(takeConfigTask)
+  pushFrontTask.mustRunAfter(pushBackTask)
+  indexcreateTask.mustRunAfter(pushFrontTask)
+  helmTask.mustRunAfter(indexcreateTask)
 }
+
diff --git a/playground/terraform/infrastructure/gke/main.tf b/playground/terraform/infrastructure/gke/main.tf
index bdc11d1b6b2..3e9dd990e67 100644
--- a/playground/terraform/infrastructure/gke/main.tf
+++ b/playground/terraform/infrastructure/gke/main.tf
@@ -18,16 +18,31 @@
 #
 
 resource "google_container_cluster" "playground-gke" {
-  name               = var.name
-  project            = var.project_id
-  location           = var.location
-  initial_node_count = var.node_count
-  network            = var.network
-  subnetwork         = var.subnetwork
+  name                       = var.name
+  project                    = var.project_id
+  location                   = var.location
+  initial_node_count         = var.min_count
+  network                    = var.network
+  subnetwork                 = var.subnetwork
+  remove_default_node_pool = true
+}
+
+resource "google_container_node_pool" "playground-node-pool" {
+  name       = "playground-node-pool"
+  cluster    = google_container_cluster.playground-gke.name
+  location   = google_container_cluster.playground-gke.location
+  autoscaling {
+    min_node_count = var.min_count
+    max_node_count = var.max_count
+   }
+  node_count = 2 
+  management {
+    auto_repair  = "true"
+    auto_upgrade = "true"
+   }
   node_config {
     machine_type    = var.machine_type
     service_account = var.service_account_email
-
     oauth_scopes = [
       "https://www.googleapis.com/auth/cloud-platform"
     ]
@@ -35,6 +50,5 @@ resource "google_container_cluster" "playground-gke" {
       component = "beam-playground"
     }
     tags = ["beam-playground"]
-
-  }
-}
+   }
+}
\ No newline at end of file
diff --git a/playground/terraform/infrastructure/gke/variables.tf b/playground/terraform/infrastructure/gke/variables.tf
index 97d3b1baa70..3b3b7369d51 100644
--- a/playground/terraform/infrastructure/gke/variables.tf
+++ b/playground/terraform/infrastructure/gke/variables.tf
@@ -25,12 +25,6 @@ variable "machine_type" {
   description = "Node pool machine types , for prod set  c2d-highcpu-16"
   default     = "e2-standard-4"
 }
-
-variable "node_count" {
-  description = "Node pool size"
-  default     = 1
-}
-
 variable "service_account_email" {
   description = "Service account email"
 }
@@ -51,3 +45,13 @@ variable "network" {
 variable "subnetwork" {
   description = "GCP subnetwork within which resources are provisioned"
 }
+
+variable "min_count" {
+  description = "Min cluster node count"
+  default     = 2
+}
+
+variable "max_count" {
+  description = "Max cluster node count"
+  default     = 6
+}
\ No newline at end of file
diff --git a/playground/terraform/infrastructure/main.tf b/playground/terraform/infrastructure/main.tf
index ffd17eaa668..fa9353b72da 100644
--- a/playground/terraform/infrastructure/main.tf
+++ b/playground/terraform/infrastructure/main.tf
@@ -62,7 +62,8 @@ module "gke" {
   project_id            = var.project_id
   service_account_email = module.setup.service_account_email
   machine_type      = var.gke_machine_type
-  node_count        = var.gke_node_count
+  min_count         = var.min_count
+  max_count         = var.max_count
   name              = var.gke_name
   location          = var.location
   subnetwork        = module.network.playground_subnetwork_id
diff --git a/playground/terraform/infrastructure/memorystore/variables.tf b/playground/terraform/infrastructure/memorystore/variables.tf
index 717e9249b0e..49e80637b07 100644
--- a/playground/terraform/infrastructure/memorystore/variables.tf
+++ b/playground/terraform/infrastructure/memorystore/variables.tf
@@ -43,7 +43,7 @@ variable "name" {
 
 variable "tier" {
   description = "Tier of Redis. For tired 'STANDARD_HA' need set read_replicas_mode "
-  default     = "STANDARD_HA"
+  default     = "BASIC"
 }
 
 variable "replicas_mode" {
diff --git a/playground/terraform/infrastructure/variables.tf b/playground/terraform/infrastructure/variables.tf
index d512be9fdec..168c70c85e5 100644
--- a/playground/terraform/infrastructure/variables.tf
+++ b/playground/terraform/infrastructure/variables.tf
@@ -136,11 +136,6 @@ variable "gke_machine_type" {
   default     = "e2-standard-4"
 }
 
-variable "gke_node_count" {
-  description = "Node pool size"
-  default     = 1
-}
-
 variable "gke_name" {
   description = "Name of GKE cluster"
   default     = "playground-examples"
@@ -153,3 +148,13 @@ variable "gke_location" {
 variable "location" {
   description = "Location of GKE cluster"
 }
+
+variable "min_count" {
+  description = "Min cluster node count"
+  default     = 2
+}
+
+variable "max_count" {
+  description = "Max cluster node count"
+  default     = 6
+}
\ No newline at end of file
diff --git a/playground/terraform/main.tf b/playground/terraform/main.tf
index 2c9b2cc8118..ffbedca10ba 100644
--- a/playground/terraform/main.tf
+++ b/playground/terraform/main.tf
@@ -38,7 +38,6 @@ module "infrastructure" {
   network_name                  = var.network_name
   #GKE
   gke_machine_type              = var.gke_machine_type
-  gke_node_count                = var.gke_node_count
   gke_name                      = var.gke_name
   gke_location                  = var.location
   service_account               = var.service_account
diff --git a/playground/terraform/variables.tf b/playground/terraform/variables.tf
index b1dceaff584..9d5c3ba9e4a 100644
--- a/playground/terraform/variables.tf
+++ b/playground/terraform/variables.tf
@@ -40,19 +40,20 @@ variable "gke_machine_type" {
   default     = "e2-standard-4"
 }
 
-variable "gke_node_count" {
-  description = "Node pool size"
-  default     = 1
-}
-
 variable "gke_name" {
   description = "Name of GKE cluster"
   default = "playground-backend"
 }
 
-#  variable "gke_location" {
-#    description = "Location of GKE cluster"
-#  }
+variable "min_count" {
+  description = "Min cluster node count"
+  default     = 2
+}
+
+variable "max_count" {
+  description = "Max cluster node count"
+  default     = 6
+}
 
 variable "service_account" {
   description = "Service account id"
@@ -65,10 +66,6 @@ variable "repository_id" {
   default     = "playground-repository"
 }
 
-# variable "repository_location" {
-#   description = "Location of Artifact Registry"
-# }
-
 #Redis
 
 variable "redis_version" {
@@ -120,10 +117,6 @@ variable "docker_image_name" {
   description = "Base prefix for docker images"
 }
 
-# variable "application_location" {
-#   description = "Location of App"
-# }
-
 # Frontend variables
 
 variable "frontend_service_name" {
@@ -295,7 +288,6 @@ variable "router_cpu" {
   default     = 2
 }
 
-
 variable "state_bucket" {
   description = "GCP bucket that used to store terraform state"
   default     = "beam_playground_terraform"