Skip to content

Commit

Permalink
fix: min_cpu_platform ref in cluster autoscaling (#2208)
Browse files Browse the repository at this point in the history
Signed-off-by: drfaust92 <[email protected]>
  • Loading branch information
DrFaust92 authored Dec 17, 2024
1 parent 9a86b4a commit f48e732
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ resource "google_container_cluster" "primary" {
}

{% if beta_cluster %}
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(var.cluster_autoscaling, "min_cpu_platform", "")
{% endif %}

image_type = lookup(var.cluster_autoscaling, "image_type", "COS_CONTAINERD")
Expand Down
1 change: 1 addition & 0 deletions examples/simple_regional_cluster_autoscaling/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module "gke" {
cluster_autoscaling = {
enabled = true
autoscaling_profile = "OPTIMIZE_UTILIZATION"
min_cpu_platform = "Intel Skylake"
min_cpu_cores = 4
max_cpu_cores = 86
min_memory_gb = 16
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ resource "google_container_cluster" "primary" {
enable_integrity_monitoring = lookup(var.cluster_autoscaling, "enable_integrity_monitoring", true)
}

min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(var.cluster_autoscaling, "min_cpu_platform", "")

image_type = lookup(var.cluster_autoscaling, "image_type", "COS_CONTAINERD")
}
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ resource "google_container_cluster" "primary" {
enable_integrity_monitoring = lookup(var.cluster_autoscaling, "enable_integrity_monitoring", true)
}

min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(var.cluster_autoscaling, "min_cpu_platform", "")

image_type = lookup(var.cluster_autoscaling, "image_type", "COS_CONTAINERD")
}
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ resource "google_container_cluster" "primary" {
enable_integrity_monitoring = lookup(var.cluster_autoscaling, "enable_integrity_monitoring", true)
}

min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(var.cluster_autoscaling, "min_cpu_platform", "")

image_type = lookup(var.cluster_autoscaling, "image_type", "COS_CONTAINERD")
}
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ resource "google_container_cluster" "primary" {
enable_integrity_monitoring = lookup(var.cluster_autoscaling, "enable_integrity_monitoring", true)
}

min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(var.cluster_autoscaling, "min_cpu_platform", "")

image_type = lookup(var.cluster_autoscaling, "image_type", "COS_CONTAINERD")
}
Expand Down

0 comments on commit f48e732

Please sign in to comment.