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" {
322
322
323
323
{% if autopilot_cluster != true %}
324
324
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] : []
326
326
content {
327
327
network_tags {
328
328
tags = var.add_cluster_firewall_rules ? (concat(var.network_tags, [local.cluster_network_tag])) : var.network_tags
329
329
}
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
+ }
330
337
}
331
338
}
332
339
{% endif %}
Original file line number Diff line number Diff line change @@ -231,11 +231,18 @@ resource "google_container_cluster" "primary" {
231
231
}
232
232
233
233
dynamic "node_pool_auto_config" {
234
- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
234
+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
235
235
content {
236
236
network_tags {
237
237
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
238
238
}
239
+
240
+ dynamic "linux_node_config" {
241
+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
242
+ content {
243
+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
244
+ }
245
+ }
239
246
}
240
247
}
241
248
Original file line number Diff line number Diff line change @@ -244,11 +244,18 @@ resource "google_container_cluster" "primary" {
244
244
}
245
245
246
246
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 ] : []
248
248
content {
249
249
network_tags {
250
250
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
251
251
}
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
+ }
252
259
}
253
260
}
254
261
Original file line number Diff line number Diff line change @@ -244,11 +244,18 @@ resource "google_container_cluster" "primary" {
244
244
}
245
245
246
246
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 ] : []
248
248
content {
249
249
network_tags {
250
250
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
251
251
}
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
+ }
252
259
}
253
260
}
254
261
Original file line number Diff line number Diff line change @@ -244,11 +244,18 @@ resource "google_container_cluster" "primary" {
244
244
}
245
245
246
246
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 ] : []
248
248
content {
249
249
network_tags {
250
250
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
251
251
}
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
+ }
252
259
}
253
260
}
254
261
Original file line number Diff line number Diff line change @@ -244,11 +244,18 @@ resource "google_container_cluster" "primary" {
244
244
}
245
245
246
246
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 ] : []
248
248
content {
249
249
network_tags {
250
250
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
251
251
}
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
+ }
252
259
}
253
260
}
254
261
Original file line number Diff line number Diff line change @@ -231,11 +231,18 @@ resource "google_container_cluster" "primary" {
231
231
}
232
232
233
233
dynamic "node_pool_auto_config" {
234
- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
234
+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
235
235
content {
236
236
network_tags {
237
237
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
238
238
}
239
+
240
+ dynamic "linux_node_config" {
241
+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
242
+ content {
243
+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
244
+ }
245
+ }
239
246
}
240
247
}
241
248
Original file line number Diff line number Diff line change @@ -231,11 +231,18 @@ resource "google_container_cluster" "primary" {
231
231
}
232
232
233
233
dynamic "node_pool_auto_config" {
234
- for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules ) ? [1 ] : []
234
+ for_each = var. cluster_autoscaling . enabled && (length (var. network_tags ) > 0 || var. add_cluster_firewall_rules || local . node_pools_cgroup_mode != null ) ? [1 ] : []
235
235
content {
236
236
network_tags {
237
237
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
238
238
}
239
+
240
+ dynamic "linux_node_config" {
241
+ for_each = local. node_pools_cgroup_mode [" all" ] != " " ? [1 ] : []
242
+ content {
243
+ cgroup_mode = local. node_pools_cgroup_mode [" all" ]
244
+ }
245
+ }
239
246
}
240
247
}
241
248
You can’t perform that action at this time.
0 commit comments