Skip to content

Commit

Permalink
test/framework: scale up should use allocatable memory
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
vincepri authored and k8s-infra-cherrypick-robot committed Aug 5, 2024
1 parent 29f537d commit 5c28d1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/framework/autoscaler_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5c28d1b

Please sign in to comment.