Skip to content

Commit

Permalink
feat: node count down to 1, vertical scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
tunacinsoy committed Sep 3, 2024
1 parent 5f42020 commit 66797a8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions terraform/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ locals {
resource "google_container_cluster" "main" {
name = "${var.cluster_name}-${var.branch}"
location = var.location
initial_node_count = 3
initial_node_count = 1

# Only for prod env it will be deployed, since prod won't accept not-attested images
dynamic "binary_authorization" {
Expand All @@ -27,6 +27,8 @@ resource "google_container_cluster" "main" {
}

node_config {

machine_type = "e2-standard-16"
service_account = local.service_account_email # Retrieving the email of the service account from locals
disk_size_gb = 10 # Setting disk size to 10 GB because of the free account quota limits
oauth_scopes = [
Expand All @@ -37,9 +39,10 @@ resource "google_container_cluster" "main" {

]
}

# Defines how long Terraform should wait for the create and update operations to complete.
timeouts {
create = "30m" # Allows up to 30 minutes for the cluster creation process
update = "40m" # Allows up to 40 minutes for the cluster update process
}
}
}

0 comments on commit 66797a8

Please sign in to comment.