Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions spartan/terraform/gke-cluster/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ resource "google_container_cluster" "primary" {
deletion_protection = true

# Kubernetes version
min_master_version = "latest"
min_master_version = var.node_version
node_version = var.node_version
release_channel {
channel = "STABLE"
}


# Network configuration
network = "default"
Expand All @@ -28,6 +33,7 @@ resource "google_container_node_pool" "aztec_nodes_2core_ssd" {
name = "${var.cluster_name}-2core-ssd"
location = var.zone
cluster = var.cluster_name
version = var.node_version

# Enable autoscaling
autoscaling {
Expand Down Expand Up @@ -60,7 +66,7 @@ resource "google_container_node_pool" "aztec_nodes_4core_ssd" {
name = "${var.cluster_name}-4core-ssd"
location = var.zone
cluster = var.cluster_name

version = var.node_version
# Enable autoscaling
autoscaling {
min_node_count = 0
Expand Down Expand Up @@ -92,7 +98,7 @@ resource "google_container_node_pool" "aztec_nodes_2core" {
name = "${var.cluster_name}-2core"
location = var.zone
cluster = var.cluster_name

version = var.node_version
# Enable autoscaling
autoscaling {
min_node_count = 0
Expand Down Expand Up @@ -120,7 +126,7 @@ resource "google_container_node_pool" "aztec_nodes_4core" {
name = "${var.cluster_name}-4core"
location = var.zone
cluster = var.cluster_name

version = var.node_version
# Enable autoscaling
autoscaling {
min_node_count = 0
Expand Down Expand Up @@ -154,7 +160,7 @@ resource "google_container_node_pool" "aztec_nodes-8core" {
name = "${var.cluster_name}-8core"
location = var.zone
cluster = var.cluster_name

version = var.node_version
# Enable autoscaling
autoscaling {
min_node_count = 0
Expand Down Expand Up @@ -188,7 +194,7 @@ resource "google_container_node_pool" "spot_nodes_32core" {
name = "${var.cluster_name}-32core-spot"
location = var.zone
cluster = var.cluster_name

version = var.node_version
# Enable autoscaling
autoscaling {
min_node_count = 0
Expand Down Expand Up @@ -231,7 +237,7 @@ resource "google_container_node_pool" "spot_nodes_2core" {
name = "${var.cluster_name}-2core-spot"
location = var.zone
cluster = var.cluster_name

version = var.node_version
# Enable autoscaling
autoscaling {
min_node_count = 0
Expand Down
4 changes: 4 additions & 0 deletions spartan/terraform/gke-cluster/cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ variable "cluster_name" {
variable "service_account" {

}

variable "node_version" {
default = "1.30.5-gke.1713000"
}
Loading