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 @@ -324,11 +324,18 @@ resource "google_container_cluster" "primary" {
324324
325325{% if autopilot_cluster != true %}
326326 dynamic "node_pool_auto_config" {
327- for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules) ? [1] : []
327+ for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules || local.node_pools_cgroup_mode != null ) ? [1] : []
328328 content {
329329 network_tags {
330330 tags = var.add_cluster_firewall_rules ? (concat(var.network_tags, [local.cluster_network_tag])) : var.network_tags
331331 }
332+
333+ dynamic "linux_node_config" {
334+ for_each = local.node_pools_cgroup_mode["all"] != "" ? [1] : []
335+ content {
336+ cgroup_mode = local.node_pools_cgroup_mode["all"]
337+ }
338+ }
332339 }
333340 }
334341{% endif %}
Original file line number Diff line number Diff line change @@ -225,11 +225,18 @@ resource "google_container_cluster" "primary" {
225225 }
226226
227227 dynamic "node_pool_auto_config" {
228- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
228+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
229229 content {
230230 network_tags {
231231 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
232232 }
233+
234+ dynamic "linux_node_config" {
235+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
236+ content {
237+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
238+ }
239+ }
233240 }
234241 }
235242
Original file line number Diff line number Diff line change @@ -244,11 +244,18 @@ resource "google_container_cluster" "primary" {
244244 }
245245
246246 dynamic "node_pool_auto_config" {
247- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
247+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
248248 content {
249249 network_tags {
250250 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
251251 }
252+
253+ dynamic "linux_node_config" {
254+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
255+ content {
256+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
257+ }
258+ }
252259 }
253260 }
254261
Original file line number Diff line number Diff line change @@ -244,11 +244,18 @@ resource "google_container_cluster" "primary" {
244244 }
245245
246246 dynamic "node_pool_auto_config" {
247- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
247+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
248248 content {
249249 network_tags {
250250 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
251251 }
252+
253+ dynamic "linux_node_config" {
254+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
255+ content {
256+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
257+ }
258+ }
252259 }
253260 }
254261
Original file line number Diff line number Diff line change @@ -244,11 +244,18 @@ resource "google_container_cluster" "primary" {
244244 }
245245
246246 dynamic "node_pool_auto_config" {
247- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
247+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
248248 content {
249249 network_tags {
250250 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
251251 }
252+
253+ dynamic "linux_node_config" {
254+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
255+ content {
256+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
257+ }
258+ }
252259 }
253260 }
254261
Original file line number Diff line number Diff line change @@ -244,11 +244,18 @@ resource "google_container_cluster" "primary" {
244244 }
245245
246246 dynamic "node_pool_auto_config" {
247- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
247+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
248248 content {
249249 network_tags {
250250 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
251251 }
252+
253+ dynamic "linux_node_config" {
254+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
255+ content {
256+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
257+ }
258+ }
252259 }
253260 }
254261
Original file line number Diff line number Diff line change @@ -225,11 +225,18 @@ resource "google_container_cluster" "primary" {
225225 }
226226
227227 dynamic "node_pool_auto_config" {
228- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
228+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
229229 content {
230230 network_tags {
231231 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
232232 }
233+
234+ dynamic "linux_node_config" {
235+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
236+ content {
237+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
238+ }
239+ }
233240 }
234241 }
235242
Original file line number Diff line number Diff line change @@ -225,11 +225,18 @@ resource "google_container_cluster" "primary" {
225225 }
226226
227227 dynamic "node_pool_auto_config" {
228- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
228+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
229229 content {
230230 network_tags {
231231 tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
232232 }
233+
234+ dynamic "linux_node_config" {
235+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
236+ content {
237+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
238+ }
239+ }
233240 }
234241 }
235242
You can’t perform that action at this time.
0 commit comments