-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
TL;DR
For module users who want to pin the CGROUP version using the new node_pools_cgroup_mode
feature released in #2001, specifying an "all
" key does not correctly apply the value to all node-pools like expected.
Some examples...
This does not apply the change to any node pools.
node_pools_cgroup_mode = {
all = "CGROUP_MODE_V2"
}
...but specifying the individual node pool names does work:
node_pools_cgroup_mode = {
default-pool = "CGROUP_MODE_V2"
ondemand = "CGROUP_MODE_V2"
spot = "CGROUP_MODE_V2"
}
I believe that the logic for handling all
is missing from here:
cgroup_mode = local.node_pools_cgroup_mode[each.value["name"]] == "" ? null : local.node_pools_cgroup_mode[each.value["name"]] |
Expected behavior
The all
key is nice for users who want to pin the CGROUP version for all node-pools without needing to specify each individual node-pool.
The default variable does include an all
key, so I believe that the intention is to have this working:
terraform-google-kubernetes-engine/modules/beta-private-cluster/variables.tf
Lines 243 to 246 in ef6c1ba
default = { | |
all = "" | |
default-node-pool = "" | |
} |
Observed behavior
When specifying all
for node_pools_cgroup_mode
, no changes are made to the cluster configuration. When each individual node-pool is specified, then changes are made correctly.
Terraform Configuration
node_pools_cgroup_mode = {
all = "CGROUP_MODE_V2"
}
Terraform Version
1.9.8
Additional information
No response