diff --git a/modules/workers/locals.tf b/modules/workers/locals.tf index b7c51676..f239e12f 100644 --- a/modules/workers/locals.tf +++ b/modules/workers/locals.tf @@ -39,6 +39,7 @@ locals { image_id = var.image_id image_type = var.image_type kubernetes_version = var.kubernetes_version + max_pods_per_node = min(max(var.max_pods_per_node, 1), 110) memory = local.memory mode = var.worker_pool_mode node_cycling_enabled = false diff --git a/modules/workers/nodepools.tf b/modules/workers/nodepools.tf index aeb258b1..bcc3f3df 100644 --- a/modules/workers/nodepools.tf +++ b/modules/workers/nodepools.tf @@ -57,7 +57,7 @@ resource "oci_containerengine_node_pool" "workers" { for_each = var.cni_type == "npn" ? [1] : [] content { # VCN-Native requires max pods/node, nsg ids, subnet ids cni_type = "OCI_VCN_IP_NATIVE" - max_pods_per_node = min(max(var.max_pods_per_node, 1), 110) + max_pods_per_node = each.value.max_pods_per_node pod_nsg_ids = compact(tolist(each.value.pod_nsg_ids)) pod_subnet_ids = compact(tolist([each.value.pod_subnet_id])) }