Please sign in to comment.
Merge pull request #57168 from yastij/predicates-ordering
Automatic merge from submit-queue (batch tested with PRs 57252, 57168). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Implementing predicates ordering **What this PR does / why we need it**: implements predicates ordering for the scheduler **Which issue(s) this PR fixes** : Fixes #53812 **Special notes for your reviewer**: @bsalamat @gmarek @resouer as discussed on slack, to implement ordering we have to choices: - use a layered approach with a list that indexes the order of the predicates map - change the underlying data structure used to represent a collection of predicates (a map in our case) into a list of predicates objects. Going with this solution might be "cleaner" but it will require a lot of changes and will increase the cost for accessing predicates from O(1) to O(n) (n being the number of predicates used by the scheduler). we might go with this solution for now. If the number of predicates start growing, we might switch to the second option. **Release note**: ```release-note adding predicates ordering for the kubernetes scheduler. ```
- Loading branch information...
Showing with 109 additions and 56 deletions.
- +42 −3 plugin/pkg/scheduler/algorithm/predicates/predicates.go
- +20 −20 plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go
- +1 −1 plugin/pkg/scheduler/algorithmprovider/defaults/defaults_test.go
- +28 −25 plugin/pkg/scheduler/core/generic_scheduler.go
- +11 −2 plugin/pkg/scheduler/core/generic_scheduler_test.go
- +3 −3 plugin/pkg/scheduler/factory/factory.go
- +1 −1 plugin/pkg/scheduler/scheduler.go
- +3 −1 plugin/pkg/scheduler/scheduler_test.go