File tree Expand file tree Collapse file tree 8 files changed +64
-8
lines changed
beta-private-cluster-update-variant
beta-public-cluster-update-variant
private-cluster-update-variant Expand file tree Collapse file tree 8 files changed +64
-8
lines changed Original file line number Diff line number Diff line change @@ -322,11 +322,18 @@ resource "google_container_cluster" "primary" {
322322
323323{% if autopilot_cluster != true %}
324324 dynamic "node_pool_auto_config" {
325- for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules) ? [1] : []
325+ for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules || local.node_pools_cgroup_mode != null ) ? [1] : []
326326 content {
327327 network_tags {
328328 tags = var.add_cluster_firewall_rules ? (concat(var.network_tags, [local.cluster_network_tag])) : var.network_tags
329329 }
330+
331+ dynamic "linux_node_config" {
332+ for_each = local.node_pools_cgroup_mode["all"] != "" ? [1] : []
333+ content {
334+ cgroup_mode = local.node_pools_cgroup_mode["all"]
335+ }
336+ }
330337 }
331338 }
332339{% endif %}
Original file line number Diff line number Diff line change @@ -223,11 +223,18 @@ resource "google_container_cluster" "primary" {
223223 }
224224
225225 dynamic "node_pool_auto_config" {
226- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
226+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
227227 content {
228228 network_tags {
229229 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
230230 }
231+
232+ dynamic "linux_node_config" {
233+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
234+ content {
235+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
236+ }
237+ }
231238 }
232239 }
233240
Original file line number Diff line number Diff line change @@ -242,11 +242,18 @@ resource "google_container_cluster" "primary" {
242242 }
243243
244244 dynamic "node_pool_auto_config" {
245- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
245+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
246246 content {
247247 network_tags {
248248 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
249249 }
250+
251+ dynamic "linux_node_config" {
252+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
253+ content {
254+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
255+ }
256+ }
250257 }
251258 }
252259
Original file line number Diff line number Diff line change @@ -242,11 +242,18 @@ resource "google_container_cluster" "primary" {
242242 }
243243
244244 dynamic "node_pool_auto_config" {
245- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
245+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
246246 content {
247247 network_tags {
248248 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
249249 }
250+
251+ dynamic "linux_node_config" {
252+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
253+ content {
254+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
255+ }
256+ }
250257 }
251258 }
252259
Original file line number Diff line number Diff line change @@ -242,11 +242,18 @@ resource "google_container_cluster" "primary" {
242242 }
243243
244244 dynamic "node_pool_auto_config" {
245- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
245+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
246246 content {
247247 network_tags {
248248 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
249249 }
250+
251+ dynamic "linux_node_config" {
252+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
253+ content {
254+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
255+ }
256+ }
250257 }
251258 }
252259
Original file line number Diff line number Diff line change @@ -242,11 +242,18 @@ resource "google_container_cluster" "primary" {
242242 }
243243
244244 dynamic "node_pool_auto_config" {
245- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
245+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
246246 content {
247247 network_tags {
248248 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
249249 }
250+
251+ dynamic "linux_node_config" {
252+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
253+ content {
254+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
255+ }
256+ }
250257 }
251258 }
252259
Original file line number Diff line number Diff line change @@ -223,11 +223,18 @@ resource "google_container_cluster" "primary" {
223223 }
224224
225225 dynamic "node_pool_auto_config" {
226- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
226+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
227227 content {
228228 network_tags {
229229 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
230230 }
231+
232+ dynamic "linux_node_config" {
233+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
234+ content {
235+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
236+ }
237+ }
231238 }
232239 }
233240
Original file line number Diff line number Diff line change @@ -223,11 +223,18 @@ resource "google_container_cluster" "primary" {
223223 }
224224
225225 dynamic "node_pool_auto_config" {
226- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
226+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
227227 content {
228228 network_tags {
229229 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
230230 }
231+
232+ dynamic "linux_node_config" {
233+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
234+ content {
235+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
236+ }
237+ }
231238 }
232239 }
233240
You can’t perform that action at this time.
0 commit comments