From 5c28d1b94484d5acec8cd9b3d599f4085cea24b6 Mon Sep 17 00:00:00 2001 From: Vince Prignano Date: Fri, 2 Aug 2024 07:46:26 -0700 Subject: [PATCH] test/framework: scale up should use allocatable memory Capacity has the entire memory pool that the node carries, while allocatable is the true memory available for scheduling purposes. Signed-off-by: Vince Prignano --- test/framework/autoscaler_helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/framework/autoscaler_helpers.go b/test/framework/autoscaler_helpers.go index 74cbd5c50221..3b2bffc444ac 100644 --- a/test/framework/autoscaler_helpers.go +++ b/test/framework/autoscaler_helpers.go @@ -155,7 +155,7 @@ func AddScaleUpDeploymentAndWait(ctx context.Context, input AddScaleUpDeployment if _, ok := n.Labels[nodeRoleOldControlPlane]; ok { continue } - memory = n.Status.Capacity.Memory() // Assume that all nodes have the same memory. + memory = n.Status.Allocatable.Memory() // Assume that all nodes have the same memory. workers++ } Expect(memory).ToNot(BeNil(), "failed to get memory for the worker node")