Consider changing MaxClusters plugin to respect avoidMigration option
limhawjia opened this issue · 0 comments
limhawjia commented
The MaxClusters scheduler plugin does not have any preference for current placements. This undermines the avoidMigration
field in propagation policies when maxClusters
is set. We can consider adding support for the avoidMigration
field.
The new behavior when avoidDisruption == true
would look something like:
if len(currentClusters) == maxClusters {
return currentClusters
} else if len(currentClusters) > maxClusters {
// remove lowest scoring clusters
removeLowestScoreClusters(currentClusters, clusterScores, maxClusters)
return currentClusters
} else {
// add highest scoring clusters that are not already present
addHighestScoreClusters(currentClusters, clusterScores, maxClusters)
return currentClusters
}