Skip to content

Commit cd8a58e

Browse files
authored
Merge pull request #43 from worldcoin/feat/limit-warm-ip-target-to-4-and-disable-pod-eni
INFRA-5508 & INFRA-5506: Limit `warm_ip_target` to 4 and disable POD ENI
2 parents 248ac75 + 21505c8 commit cd8a58e

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

cluster-addons.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ resource "aws_eks_addon" "vpc_cni" {
7474
resolve_conflicts_on_create = "OVERWRITE"
7575
resolve_conflicts_on_update = "OVERWRITE"
7676
configuration_values = jsonencode({
77-
env : {
77+
env : merge({
7878
ENABLE_PREFIX_DELEGATION : lower(tostring(var.vpc_cni_enable_prefix_delegation)), # Enable prefix delegation for IPv6, allocate IPs in /28 blocks (instead of all at once)
79-
WARM_IP_TARGET : var.vpc_cni_warm_ip_target, # Keep +8 IPs warm for each node to speed up pod scheduling
79+
WARM_IP_TARGET : var.vpc_cni_warm_ip_target, # Keep +4 IPs warm for each node to speed up pod scheduling
8080
WARM_ENI_TARGET : var.vpc_cni_warm_eni_target, # Keep +1 ENI warm for each node to speed up pod scheduling
81-
ENABLE_POD_ENI : lower(tostring(var.vpc_cni_enable_pod_eni)), # Enable pod ENI support
8281
POD_SECURITY_GROUP_ENFORCING_MODE : lower(tostring(var.vpc_cni_pod_security_group_enforcing_mode)), # Enable pod security group enforcing mode
8382
AWS_VPC_K8S_CNI_EXTERNALSNAT : lower(tostring(var.vpc_cni_external_snat)), # Enable external SNAT to enable pod to pod communication across different vpc's
84-
}
83+
}, var.vpc_cni_enable_pod_eni ? {
84+
ENABLE_POD_ENI : lower(tostring(var.vpc_cni_enable_pod_eni)), # Enable pod ENI support
85+
} : {})
8586
})
8687
}
8788

@@ -194,8 +195,8 @@ resource "aws_eks_addon" "metrics_server" {
194195
memory = "200Mi"
195196
}
196197
limits = {
197-
cpu: "100m"
198-
memory: "200Mi"
198+
cpu : "100m"
199+
memory : "200Mi"
199200
}
200201
}
201202
}

variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ variable "vpc_cni_enable_prefix_delegation" {
250250
variable "vpc_cni_warm_ip_target" {
251251
description = "Number of IPs to keep warm for each node to speed up pod scheduling"
252252
type = string
253-
default = "8"
253+
default = "4"
254254
}
255255

256256
variable "vpc_cni_warm_eni_target" {
@@ -432,7 +432,7 @@ variable "public_access_cidrs" {
432432
type = list(string)
433433
default = ["0.0.0.0/0"]
434434
validation {
435-
condition = alltrue([for cidr in var.public_access_cidrs : can(cidrnetmask(cidr))])
435+
condition = alltrue([for cidr in var.public_access_cidrs : can(cidrnetmask(cidr))])
436436
error_message = "All public access CIDRs must be valid CIDR blocks."
437437
}
438438
}
@@ -685,7 +685,7 @@ variable "deploy_desired_vs_status_evaluation_period" {
685685
variable "vpc_cni_enable_pod_eni" {
686686
description = "Enable pod ENI support"
687687
type = bool
688-
default = true
688+
default = false
689689
}
690690

691691
variable "vpc_cni_pod_security_group_enforcing_mode" {

0 commit comments

Comments
 (0)