Commit Graph

55 Commits

Author SHA1 Message Date
Ahmad Diaa
a2c37bfd09 use original requests in NodeResourcesBalancedAllocation instead of NonZero (#105845) 2021-10-29 19:04:14 -07:00
JunYang
93047824f7 Structured Logging migration:modify Scheduler part logs.
Signed-off-by: JunYang <yang.jun22@zte.com.cn>
2021-08-29 20:17:08 +08:00
Marwan Ahmed
48dfa2a554 generate scheduler merge patches on the pod status instead of the full pod 2021-06-28 09:35:55 -07:00
Jan Chaloupka
b9356df066 Drop IsScalarResourceName check in GetNonzeroRequestForResource
All invokers of GetNonzeroRequestForResource in k/k are either setting
the resource name to CPU/Memory or are checking if the requested
resource name is scalar after the invocation.
Thus, it's unnecessary to check for scalar resource name again.
In the worst case, GetNonzeroRequestForResource returns non-zero
resource quantity which can be ignored by an invoker by running
IsResourceName helpers afterwards.
2021-04-30 13:00:55 +02:00
Abdullah Gharaibeh
c7fef196b6 Implements pod affinity NamespaceSelector feature 2021-03-04 07:30:24 -05:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
drfish
ebb6fb5b0c Organize scheduler unit tests into subtests 2021-02-02 21:41:20 +08:00
Jan Chaloupka
6822a0ec20 Move pkg/apis/core/v1.IsScalarResourceName under pkg/scheduler/util
IsScalarResourceName is imported only inside pkg/scheduler packages.
2020-10-27 13:40:32 +01:00
Jan Chaloupka
274c536da3 Removing GetPodPriority from pkg/api and importing PodPriority from k8s.io/component-helpers 2020-10-11 21:40:11 +02:00
Wei Huang
52bf6ba8ba Preemption plugin to fetch pod from informer cache 2020-09-08 18:27:23 -07:00
Dave Chen
77056e89e4 Avoid the API call to update pod if nothing is changed
Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-09-02 14:38:11 +08:00
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