e2e: DNS autoscaler test was not counting nodes correctly

The DNS autoscaler test was not correctly counting tainted but
schedulable nodes, meaning that the target count was not correct for
clusters with multiple control-plane nodes (which are often tainted
but schedulable).

The cluster-proportional-autoscaler ignores non-schedulable nodes, but
does not consider taints.
This commit is contained in:
Justin SB 2021-01-14 11:18:30 -05:00
parent e1f84d52b7
commit d1b67f9683

View File

@ -237,7 +237,7 @@ func getExpectReplicasFuncLinear(c clientset.Interface, params *DNSParamsLinear)
return func(c clientset.Interface) int {
var replicasFromNodes float64
var replicasFromCores float64
nodes, err := e2enode.GetReadySchedulableNodes(c)
nodes, err := e2enode.GetReadyNodesIncludingTainted(c)
framework.ExpectNoError(err)
if params.nodesPerReplica > 0 {
replicasFromNodes = math.Ceil(float64(len(nodes.Items)) / params.nodesPerReplica)