Commit Graph

64 Commits

Author SHA1 Message Date
Wei Huang
469e63eb5b
[sched] Add more retriable errors 2022-08-11 20:48:20 -07:00
jinxu
0064010cdd Promote Local storage capacity isolation feature to GA
This change is to promote local storage capacity isolation feature to GA

At the same time, to allow rootless system disable this feature due to
unable to get root fs, this change introduced a new kubelet config
"localStorageCapacityIsolation". By default it is set to true. For
rootless systems, they can set this configuration to false to disable
the feature. Once it is set, user cannot set ephemeral-storage
request/limit because capacity and allocatable will not be set.

Change-Id: I48a52e737c6a09e9131454db6ad31247b56c000a
2022-08-02 23:45:48 -07:00
Kubernetes Prow Robot
4cd1c80cea
Merge pull request #111139 from zhoumingcheng/master-u-v2
add unit test for pkg/kubelet/types/ func GetPodStartTime()
2022-07-27 11:34:52 -07:00
zhoumingcheng
9b6f880dbc add unit test for pkg/kubelet/types/ func GetPodStartTime()
Signed-off-by: zhoumingcheng <zhoumingcheng@beyondcent.com>
2022-07-27 09:26:56 +08:00
Kubernetes Prow Robot
92cb0ae6ba
Merge pull request #109832 from sanposhiho/retry-on-update
Retry when it fails to update pods status on scheduling loop
2022-07-18 19:52:05 -07:00
harry1064
fceb5cd4b1
Use clock package from k8s.io/utils/clock
- Remove unwanted clock.go file.
2022-06-25 00:25:12 +08:00
Kensei Nakada
8b18f7c869 Retry when update unschedulable pods status on scheduling loop 2022-06-17 19:09:30 +00:00
kerthcet
67b0ce87fe Using inherited context in utils
This PR focus on utils in scheduler. When to patch pod status or delete pod,
it is better to use an inherited context.
Although this do not take a big effect in preventing goroutine leak, but it is a best practice

Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-25 10:14:40 +08:00
Yibo Zhuang
fd08d47d8b cleanup: move scheduler tests to use PodWrapper
Move to use testing PodWrapper where applicable to
reduce duplicating pod creation code and shorten
number of lines.

Adding additional wrapper functions in PodWrapper
to ensure it covers all pod spec under tests.

Signed-off-by: Yibo Zhuang <yibzhuang@gmail.com>
2022-05-05 10:48:26 -07:00
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