Skip to content

Commit

Permalink
Merge branch 'master' into add_sandbox_config_param
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored Aug 28, 2019
2 parents 2ccc0f3 + b65204f commit 8792ffd
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Extending the adopted spec, each change should have a link to its corresponding
* Support for Intranode Visbiility (IV) and Veritical Pod Autoscaling (VPA) beta features [#216]
* Support for Workload Identity beta feature [#234]
* Support for Google Groups based RBAC beta feature [#217]
* Support for disabling node pool autoscaling by setting `autoscaling` to `false` within the node pool variable. [#250]

## [v4.1.0] 2019-07-24

Expand Down Expand Up @@ -172,6 +173,7 @@ Extending the adopted spec, each change should have a link to its corresponding
[v0.2.0]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/compare/v0.1.0...v0.2.0

[#241]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/241
[#250]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/250
[#236]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/236
[#217]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/217
[#234]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/234
Expand Down
11 changes: 8 additions & 3 deletions autogen/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,14 @@ resource "google_container_node_pool" "pools" {
max_pods_per_node = lookup(var.node_pools[count.index], "max_pods_per_node", null)
{% endif %}

autoscaling {
min_node_count = lookup(var.node_pools[count.index], "min_count", 1)
max_node_count = lookup(var.node_pools[count.index], "max_count", 100)
node_count = lookup(var.node_pools[count.index], "autoscaling", true) ? null : lookup(var.node_pools[count.index], "min_count", 1)

dynamic "autoscaling" {
for_each = lookup(var.node_pools[count.index], "autoscaling", true) ? [var.node_pools[count.index]] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
}
}

management {
Expand Down
2 changes: 1 addition & 1 deletion autogen/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ variable "enable_intranode_visibility" {
default = false
}

variable "enable_vertical_pod_autoscaling" {
variable "enable_vertical_pod_autoscaling" {
type = bool
description = "Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it"
default = false
Expand Down
11 changes: 8 additions & 3 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,14 @@ resource "google_container_node_pool" "pools" {
lookup(var.node_pools[count.index], "min_count", 1),
)

autoscaling {
min_node_count = lookup(var.node_pools[count.index], "min_count", 1)
max_node_count = lookup(var.node_pools[count.index], "max_count", 100)
node_count = lookup(var.node_pools[count.index], "autoscaling", true) ? null : lookup(var.node_pools[count.index], "min_count", 1)

dynamic "autoscaling" {
for_each = lookup(var.node_pools[count.index], "autoscaling", true) ? [var.node_pools[count.index]] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
}
}

management {
Expand Down
11 changes: 8 additions & 3 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,14 @@ resource "google_container_node_pool" "pools" {
)
max_pods_per_node = lookup(var.node_pools[count.index], "max_pods_per_node", null)

autoscaling {
min_node_count = lookup(var.node_pools[count.index], "min_count", 1)
max_node_count = lookup(var.node_pools[count.index], "max_count", 100)
node_count = lookup(var.node_pools[count.index], "autoscaling", true) ? null : lookup(var.node_pools[count.index], "min_count", 1)

dynamic "autoscaling" {
for_each = lookup(var.node_pools[count.index], "autoscaling", true) ? [var.node_pools[count.index]] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
}
}

management {
Expand Down
11 changes: 8 additions & 3 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,14 @@ resource "google_container_node_pool" "pools" {
)
max_pods_per_node = lookup(var.node_pools[count.index], "max_pods_per_node", null)

autoscaling {
min_node_count = lookup(var.node_pools[count.index], "min_count", 1)
max_node_count = lookup(var.node_pools[count.index], "max_count", 100)
node_count = lookup(var.node_pools[count.index], "autoscaling", true) ? null : lookup(var.node_pools[count.index], "min_count", 1)

dynamic "autoscaling" {
for_each = lookup(var.node_pools[count.index], "autoscaling", true) ? [var.node_pools[count.index]] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
}
}

management {
Expand Down
11 changes: 8 additions & 3 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,14 @@ resource "google_container_node_pool" "pools" {
lookup(var.node_pools[count.index], "min_count", 1),
)

autoscaling {
min_node_count = lookup(var.node_pools[count.index], "min_count", 1)
max_node_count = lookup(var.node_pools[count.index], "max_count", 100)
node_count = lookup(var.node_pools[count.index], "autoscaling", true) ? null : lookup(var.node_pools[count.index], "min_count", 1)

dynamic "autoscaling" {
for_each = lookup(var.node_pools[count.index], "autoscaling", true) ? [var.node_pools[count.index]] : []
content {
min_node_count = lookup(autoscaling.value, "min_count", 1)
max_node_count = lookup(autoscaling.value, "max_count", 100)
}
}

management {
Expand Down

0 comments on commit 8792ffd

Please sign in to comment.