Skip to content

Commit a1f370e

Browse files
committed
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 <[email protected]>
1 parent a96a990 commit a1f370e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/framework/autoscaler_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func AddScaleUpDeploymentAndWait(ctx context.Context, input AddScaleUpDeployment
158158
if _, ok := n.Labels[nodeRoleOldControlPlane]; ok {
159159
continue
160160
}
161-
memory = n.Status.Capacity.Memory() // Assume that all nodes have the same memory.
161+
memory = n.Status.Allocatable.Memory() // Assume that all nodes have the same memory.
162162
workers++
163163
}
164164
Expect(memory).ToNot(BeNil(), "failed to get memory for the worker node")

0 commit comments

Comments
 (0)