Skip to content

Commit

Permalink
feat: add nodepool autoscaling vars avail in GKE 1.24.1 (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmymy authored Nov 18, 2022
1 parent 0e8ff25 commit f57f3ce
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 42 deletions.
2 changes: 2 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,8 @@ resource "google_container_node_pool" "windows_pools" {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down
16 changes: 10 additions & 6 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,11 @@ resource "google_container_node_pool" "pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down Expand Up @@ -484,9 +486,11 @@ resource "google_container_node_pool" "windows_pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down
16 changes: 10 additions & 6 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,11 @@ resource "google_container_node_pool" "pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down Expand Up @@ -758,9 +760,11 @@ resource "google_container_node_pool" "windows_pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down
16 changes: 10 additions & 6 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,11 @@ resource "google_container_node_pool" "pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down Expand Up @@ -663,9 +665,11 @@ resource "google_container_node_pool" "windows_pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down
16 changes: 10 additions & 6 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,11 @@ resource "google_container_node_pool" "pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down Expand Up @@ -739,9 +741,11 @@ resource "google_container_node_pool" "windows_pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down
16 changes: 10 additions & 6 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,11 @@ resource "google_container_node_pool" "pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down Expand Up @@ -644,9 +646,11 @@ resource "google_container_node_pool" "windows_pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down
16 changes: 10 additions & 6 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,11 @@ resource "google_container_node_pool" "pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down Expand Up @@ -598,9 +600,11 @@ resource "google_container_node_pool" "windows_pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down
16 changes: 10 additions & 6 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,11 @@ resource "google_container_node_pool" "pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down Expand Up @@ -503,9 +505,11 @@ resource "google_container_node_pool" "windows_pools" {
dynamic "autoscaling" {
for_each = lookup(each.value, "autoscaling", true) ? [each.value] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
location_policy = lookup(autoscaling.value, "location_policy", null)
total_min_node_count = lookup(autoscaling.value, "total_min_count", null)
total_max_node_count = lookup(autoscaling.value, "total_max_count", null)
}
}

Expand Down

0 comments on commit f57f3ce

Please sign in to comment.