Skip to content

Commit

Permalink
fix: pin k8s version (#11599)
Browse files Browse the repository at this point in the history
`latest` strikes again!
  • Loading branch information
just-mitch authored Jan 29, 2025
1 parent cd08d04 commit c087bd8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
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"
}

0 comments on commit c087bd8

Please sign in to comment.