From 42741c506566b5b080d37b1a11859078e52c7035 Mon Sep 17 00:00:00 2001 From: Zach Howell Date: Thu, 28 May 2026 13:26:05 -0700 Subject: [PATCH] Fix static cluster nodepools for Karpenter Looks like setting replica count wasn't the end of the story. PiperOrigin-RevId: 922943100 --- .../providers/aws/elastic_kubernetes_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/perfkitbenchmarker/providers/aws/elastic_kubernetes_service.py b/perfkitbenchmarker/providers/aws/elastic_kubernetes_service.py index 15b9adb5a..b7c8bae6d 100644 --- a/perfkitbenchmarker/providers/aws/elastic_kubernetes_service.py +++ b/perfkitbenchmarker/providers/aws/elastic_kubernetes_service.py @@ -1037,6 +1037,9 @@ def _PostCreate(self): f'settings.clusterName={self.name}', '--set', f'settings.interruptionQueue={self.name}', + # Not always needed but enable the feature. + '--set', + 'settings.featureGates.staticCapacity=true', '--set', f'controller.resources.requests.cpu={controller_cpu}', '--set', @@ -1155,7 +1158,8 @@ def _CreateKarpenterNodePool(self, nodepool: container.BaseNodePoolConfig): machine_requirements ) if nodepool.min_nodes == nodepool.max_nodes: - # Not using autoscaling; set static replica count. + # Not using autoscaling; set static replica count & don't consolidate. + del yaml_nodepool[0]['spec']['disruption'] yaml_nodepool[0]['spec']['replicas'] = nodepool.num_nodes else: # NodePool CPU limit: max nodes * vCPU + 5%, max 1000.