Commit Graph

34 Commits

Author SHA1 Message Date
Abdullah Gharaibeh
05cb382357 Update PredicateMetadataProducer to accept a scheduler SharedLister instead of nodeinfomap 2019-10-25 19:19:23 -04:00
Abdullah Gharaibeh
8ec56aeafb Change all scheduler's Node and Pod list/lookups to be from the snapshot rather than the cache. 2019-10-25 14:24:55 -04:00
Abdullah Gharaibeh
d393804237 separate listers into their own package 2019-10-22 18:11:02 -04:00
draveness
39af760930 feat: several cleanups in the scheduling package
+ Remove unused variable in tests.
+ Use more common statement for interface conformance check.
+ Fix several comments in the framework plugins.
2019-10-18 11:14:05 +08:00
draveness
9554276d17 feat(scheduler): create metadata and addPod/removePod for migration 2019-10-08 10:05:22 +08:00
SataQiu
bcaa991676 scheduler: code clean up for predicates/metadata 2019-09-29 10:11:53 +08:00
Mark Janssen
345e528c86 Fix staticcheck failures for pkg/scheduler/... 2019-09-23 22:49:59 +02:00
Wei Huang
e85473c2df
Benchmark test for PodAffinity 2019-09-19 10:52:03 -07:00
Shintaro Murakami
a0c93b10c9 Remove unnecessary factory layer 2019-08-24 08:08:30 +09:00
Wei Huang
8f559ea53b
Optimize internal data structure of EvenPodsSpread
- Rename 'topologyPairsPodSpreadMap' to 'podSpreadCache'
- New struct `criticalPaths criticalPaths`
- Add unified method `*criticalPaths.update()` for:
    - regular update
    - addPod in preemption case
    - remotePod in preemption case
2019-08-20 09:26:41 -07:00
Wei Huang
7f1a3965fd
Add Benchmark test for EvenPodsSpread predicate
- go test k8s.io/kubernetes/pkg/scheduler/algorithm/predicates -benchmem -run=^$ -bench .
2019-08-20 09:25:01 -07:00
Wei Huang
0bff4c27d6
EvenPodsSpread: weigh constraints individually
- update logic to weigh each constraint individually
- address comments and misc fixes
2019-07-26 20:48:05 -07:00
Wei Huang
794847967c
EvenPodsSpread: update addPod() logic to match individual constraint
- also add TODO items for potential perf optimization
2019-07-24 15:27:55 -07:00
Wei Huang
fe7072a482
fixup: address comments 2019-07-24 15:27:55 -07:00
Wei Huang
ff831c3df2
EvenPodsSpread: Supports Preemption (addPod)
- add addPod() for podSpreadMap
2019-07-24 15:27:55 -07:00
Wei Huang
9e9808d0ab
EvenPodsSpread: Supports Preemption (removePod)
- add removePod() for podSpreadMap
2019-07-24 15:27:54 -07:00
Wei Huang
f822487f05
EvenPodsSpread: match selector of each constraint independently
- see more discussion at https://github.com/kubernetes/kubernetes/pull/77760#discussion_r305107973
2019-07-22 17:51:23 -07:00
Wei Huang
dce6686c9a
EvenPodsSpread: refactor "chained" utils
- move "chanined" utils to pkg/scheduler/testing/utils.go so as to be re-used by all scheduler tests
2019-07-22 17:34:56 -07:00
Wei Huang
3dbef991a3
EvenPodsSpread: refactor topologyPairsPodSpreadMap
- update minMatchMap from []int32 to map[string]int32
2019-07-22 17:34:56 -07:00
Wei Huang
a242e376ac
EvenPodsSpread: PredicateMetadata initilization
- build a new `topologyPairsPodSpreadMap` into PredicateMetadata
- update ShallowCopy()
- unit tests
2019-07-22 17:34:56 -07:00
yuexiao-wang
f3353c358d [scheduler cleanup phase 2]: Rename to
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-11 11:21:12 +08:00
Wei Huang
7490542156
fix PodAntiAffinity issues
- update logic of verifying incoming pod's anti-affinity
- rename podMatchesAffinityTermProperties to podMatchesAllAffinityTermProperties
- add podMatchesAnyAffinityTermProperties which is used in some PodAntiAffinity cases
- rename some functions to make it more readable
- add unit tests to verify correctness of PodAffinity and PodAntiAffinity
  - verifying "Existing pod anti-affinity"
  - verifying "incoming pod's anti-affinity"
  - verifying "incoming pod's affinity"
2018-09-13 18:32:33 -07:00
Ahmad Diaa
ac4a082b33 use topologyPairsMaps for inter pod affinity/anti-affinity maps 2018-08-30 01:48:54 +02:00
Ahmad Diaa
b4c7d190cd using set instead of lists for topologyPairsMaps attributes 2018-08-18 01:02:48 +02:00
Ahmad Diaa
0f4c3064fd created struct for topologyPairs maps 2018-08-18 01:02:48 +02:00
Ahmad Diaa
f6659e4543 further enhancements removing matchingTerms from metadata 2018-08-18 01:02:47 +02:00
Mohamed Mehany
3fb6912d08 add topologyValue map to reduce search space 2018-08-18 01:02:46 +02:00
John Calabrese
8bbf182695 use subtest for table units
apply subtest to predicates
2018-06-05 09:07:57 -04:00
Guoliang Wang
761cf41427 Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
Bobby (Babak) Salamat
3041698e52 Addressed reviewer comments 2018-04-12 16:30:08 -07:00
Bobby (Babak) Salamat
418c7502f0 Improve performance of affinity/anti-affinity predicate 2018-04-11 21:17:29 -07:00
tossmilestone
3fdacfead5 Fix golint errors in pkg/scheduler based on golint check 2018-02-08 15:22:47 +08:00
Yongkun Anfernee Gui
68c2c79362 Refactor HostIP predicate algorithm
- Remove string decode logic. It's not really helping to find the
  conflict ports, and it's expensive to do encoding/decoding
- Not to parse the container ports information in predicate meta, use
  straight []*v1.ContainerPort
- Use better data structure to search port conflict based on ip
  addresses
- Collect scattered source code into common place
2018-01-08 17:10:21 -08:00
Jonathan Basseri
30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00