Don't skip node groups that help only besteffort pods in price expander

This commit is contained in:
Marcin Wielgus 2017-06-21 15:47:47 +02:00
parent 7b3a75c294
commit ddb04529e9
1 changed files with 4 additions and 4 deletions

View File

@ -105,10 +105,10 @@ nextoption:
}
totalPodPrice += podPrice
}
if totalPodPrice == 0 {
glog.Warningf("Total pod price is 0, skipping %s", option.NodeGroup.Id())
continue
}
// Total pod price is 0 when the pods have no requests. The pods must have some other
// requirements that prevent them from scheduling like AntiAffinity, HostPort or the
// pods quota on all nodes has been already used. We use stabilizationPrice in the formula
// below so this should not be a problem.
// How well the money is spent.
priceSubScore := (totalNodePrice + stabilizationPrice) / (totalPodPrice + stabilizationPrice)