Commit Graph

44 Commits

Author SHA1 Message Date
Wei Huang
36c8ecc98c
Refactor scheduler preempt interface
- replace error with NodeToStatusMap in Preempt() signature
- eliminate podPreemptor interface and expose its functions statelessly
- move logic in scheduler.go#preempt to generic_scheduler.go#Preempt()
2020-06-15 08:42:00 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Abdullah Gharaibeh
5e0211c72d Added pre-processed required affinity terms to scheduler's PodInfo type. 2020-05-14 10:30:42 -04:00
fengzixu
d54822d193 bugfix: initcontainer wasn't considered when calculate resource request 2020-04-23 02:08:33 +09:00
Kobayashi Daisuke
e16c4f22dd Add test case in scheduler/util/non_zero_test.go to improve the test coverage. 2020-04-09 17:42:43 +09:00
Harsh Singh
015d06bf41 Internal channels for scheduler 2020-04-04 02:30:16 +05:30
Mike Dame
18ffaf5608 Move scheduler extender API V1 to staging k8s.io/kube-scheduler 2020-02-27 12:10:59 -05:00
Aldo Culquicondor
e9e11de4e1 Remove Error log for nil StartTime
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-06 14:09:44 -05:00
Abdullah Gharaibeh
fb66e807cd Remove scheduler framework dependency on predicates package 2020-01-13 13:02:31 -05:00
Wei Huang
b2159b5d66
Remove scheduler/algorithm/priorities/util package 2020-01-09 20:16:05 -08:00
Abdullah Gharaibeh
429448cb40 move inter pod affinity predicate logic to its Filter plugin 2019-12-20 16:58:36 -05:00
Harsh Singh
589656108e Replaced sortable list with native golang slice. 2019-10-12 21:57:28 +05:30
Harsh Singh
f462a31e9b Move heap into its own internal package 2019-10-05 01:24:36 +05:30
Wei Huang
a01259ef6f
bazel and codegen files 2019-10-01 09:51:40 -07:00
Wei Huang
cbdb4e3fdb
refactor scheduler extender related API
- move extender related API from pkg/scheduler/api to pkg/scheduler/apis/extender/v1

- alias extenderv1 to pkg/scheduler/apis/extender/v1

- use NodeScore and NodeScoreList in non-extender logic
2019-10-01 09:51:24 -07:00
mengyang02
a638431e4d complete pkg/scheduler/util unit tests 2019-09-30 10:58:11 +08:00
Harsh Singh
6a9ef7f04f Move GetPodPriority from /scheduler/util to /api/pod 2019-09-24 22:02:13 +05:30
Wei Huang
caab8b74ba
EvenPodsSpread: integration test 2019-08-01 10:42:27 -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
draveness
fab1948a1b feat: use channel instead of mutex in scheduling predicates 2019-07-13 09:11:52 +08:00
draveness
ca6003bc75 feat: cleanup PodPriority features gate 2019-06-23 11:57:24 +08:00
Wei Huang
63c3a617cd
auto-generated files 2019-04-08 17:51:08 -07:00
Wei Huang
7afbd68730
add metrics to record number of pending pods in different queues 2019-04-08 17:51:07 -07:00
Kubernetes Prow Robot
52ec2a0009
Merge pull request #75497 from goodluckbot/remove-backoff-util
Integrate backoff mechanism into the scheduling queue and remove the …
2019-04-05 18:06:41 -07:00
goodluckbot
151649df4c Integrate backoff mechanism into the scheduling queue and remove the Backoff util 2019-04-06 00:15:00 +08:00
Jun Gong
042b83ba73 Pick pods for preemption based on StartTime of pods when priorities are equal 2019-03-26 09:04:50 +08:00
goodluckbot
8d991e6ee2 Pick node for preemption based on start time of pods 2019-03-12 12:30:15 +08:00
Gregory Haynes
73710f06db Check for shutdown in TryBackoffAndWait 2018-12-06 16:57:20 +00:00
Gregory Haynes
5e4ccede4c Reschedule with backoff
With the alpha scheduling queue we move pods from unschedulable to
active on certain events without a backoff. As a result we can cause
starvation issues if high priority pods are in the unschedulable queue.
Implement a backoff mechanism for pods being moved to active.

Closes #56721
2018-12-06 16:38:34 +00:00
Gregory Haynes
082b48240a Implement scheduler.util.backoff as a queue
We are going to use PodBackoff for controlling backoff when adding
unschedulable pods back to the active scheduling queue. In order to do
this more easily, limit the interface for PodBackoff to only this struct
(rather than exposing BackoffEntry) and change the backing expiry
implementation to be queue based.
2018-12-04 18:01:43 +00:00
Gregory Haynes
c821f2ed2f Move scheduling Heap in to scheduler.core.utils
The Heap data structure is useful for our backoff system in addition to
scheduling queue. Move it to somewhere it can be consumed by both
systems and properly export needed names. Also adding unit tests
from client-go/tools/cache/heap.go.
2018-12-04 18:01:42 +00:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Guoliang Wang
a50404d441 [scheduler cleanup phase 1]: Move NodeInfo utils into pkg/scheduler/cache 2018-10-11 11:04:23 +08:00
tizhou86
d971778844 Add unit test cases for scheduler/util. 2018-08-23 15:26:27 +08:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
ceshihao
7f24a7c984 run make update 2018-04-28 15:43:09 +00:00
ceshihao
56b3f2f409 move pkg/scheduler/util/testutil.go to pkg/scheduler/testing 2018-04-28 02:36:04 +00:00
David Eads
a89291a5de stop duplicating preferred version order 2018-04-26 10:03:36 -04:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08: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
85c5862552 Fix scheduler refs in BUILD files.
Update references to moved scheduler code.
2018-01-05 15:05:01 -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