Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider changing MaxClusters plugin to respect avoidMigration option #108

Open
limhawjia opened this issue Jun 12, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@limhawjia
Copy link
Collaborator

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
}
@gary-lgy gary-lgy added the enhancement New feature or request label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants