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" {
324
324
325
325
{% if autopilot_cluster != true %}
326
326
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] : []
328
328
content {
329
329
network_tags {
330
330
tags = var.add_cluster_firewall_rules ? (concat(var.network_tags, [local.cluster_network_tag])) : var.network_tags
331
331
}
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
+ }
332
339
}
333
340
}
334
341
{% endif %}
Original file line number Diff line number Diff line change @@ -225,11 +225,18 @@ resource "google_container_cluster" "primary" {
225
225
}
226
226
227
227
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 ] : []
229
229
content {
230
230
network_tags {
231
231
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
232
232
}
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
+ }
233
240
}
234
241
}
235
242
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 @@ -225,11 +225,18 @@ resource "google_container_cluster" "primary" {
225
225
}
226
226
227
227
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 ] : []
229
229
content {
230
230
network_tags {
231
231
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
232
232
}
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
+ }
233
240
}
234
241
}
235
242
Original file line number Diff line number Diff line change @@ -225,11 +225,18 @@ resource "google_container_cluster" "primary" {
225
225
}
226
226
227
227
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 ] : []
229
229
content {
230
230
network_tags {
231
231
tags = var. add_cluster_firewall_rules ? (concat (var. network_tags , [local . cluster_network_tag ])) : var. network_tags
232
232
}
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
+ }
233
240
}
234
241
}
235
242
You can’t perform that action at this time.
0 commit comments