File tree Expand file tree Collapse file tree
perfkitbenchmarker/providers/aws Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -993,6 +993,29 @@ def _DefaultNodepoolInstanceTypes() -> list[str]:
993993 def _PostCreate (self ):
994994 """Performs post-creation steps for the cluster."""
995995 super ()._PostCreate ()
996+ if FLAGS .eks_tune_vpc_cni_for_scale :
997+ logging .info ('Tuning aws-node (VPC CNI) for kubernetes_node_scale' )
998+ kubectl .RunKubectlCommand ([
999+ 'set' ,
1000+ 'env' ,
1001+ 'daemonset/aws-node' ,
1002+ '-n' ,
1003+ 'kube-system' ,
1004+ 'WARM_ENI_TARGET=0' ,
1005+ 'WARM_IP_TARGET=1' ,
1006+ 'MINIMUM_IP_TARGET=1' ,
1007+ ])
1008+ kubectl .RunRetryableKubectlCommand (
1009+ [
1010+ 'rollout' ,
1011+ 'status' ,
1012+ 'daemonset/aws-node' ,
1013+ '-n' ,
1014+ 'kube-system' ,
1015+ '--timeout=%ds' % vm_util .DEFAULT_TIMEOUT ,
1016+ ],
1017+ timeout = vm_util .DEFAULT_TIMEOUT ,
1018+ )
9961019 # Karpenter controller resources: default 1/1Gi; scale up when
9971020 # node_scale target exceeds 1000 nodes.
9981021 num_nodes = getattr (FLAGS , 'kubernetes_scale_num_nodes' , None )
Original file line number Diff line number Diff line change 246246 'Comma-separated EC2 types for the Karpenter default NodePool (worker '
247247 'nodes only). Empty keeps instance-category/generation in the template.' ,
248248)
249+ flags .DEFINE_boolean (
250+ 'eks_tune_vpc_cni_for_scale' ,
251+ False ,
252+ 'Tune aws-node DaemonSet warm-pool settings (WARM_ENI_TARGET=0, '
253+ 'WARM_IP_TARGET=1, MINIMUM_IP_TARGET=1) after cluster creation. '
254+ 'Required when scaling to thousands of nodes to prevent subnet IP '
255+ 'exhaustion. Enable when running kubernetes_node_scale at large scale.' ,
256+ )
249257AWS_CAPACITY_BLOCK_RESERVATION_ID = flags .DEFINE_string (
250258 'aws_capacity_block_reservation_id' ,
251259 None ,
You can’t perform that action at this time.
0 commit comments