kerthcet
b1ad834dfb
No need to calculate ResourceEphemeralStorage additionally
...
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-12-01 14:25:30 +08:00
carlory
0105a002bc
when the hint fn returns error, the scheduling queue logs the error and treats it as QueueAfterBackoff.
...
Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
Co-authored-by: Kante Yin <kerthcet@gmail.com>
Co-authored-by: XsWack <xushiwei5@huawei.com>
2023-09-21 09:40:44 +08:00
Patrick Ohly
e01db32573
scheduler util: handle cache.DeletedFinalStateUnknown in As
...
Informer callbacks must be prepared to get cache.DeletedFinalStateUnknown as
the deleted object. They can use that as hint that some information may have
been missed, but typically they just retrieve the stored object inside it.
2023-07-12 11:07:59 +02:00
Kensei Nakada
6f8d38406a
feature(scheduler): implement ClusterEventWithHint to filter out useless events
2023-06-22 13:36:19 +00:00
lowang_bh
eaba1703b1
enhancemanet: reduce calculation calls
...
Signed-off-by: lowang_bh <lhui_wang@163.com>
2023-04-18 22:27:35 +08:00
Todd Neal
4096c9209c
dedupe pod resource request calculation
2023-03-09 17:15:53 -06:00
Lucas Severo Alves
6b34fafdaf
Add ctx logging involved in KS startup ( #115588 )
...
* ctx logging involved in startup
as per https://github.com/kubernetes/kubernetes/pull/111155#pullrequestreview-1283257121
* use klog.Background().Error in flag handling
* revert scheduler_perf changes
* refence issue in code comment
* enable ctx logcheck for cmd/kube-scheduler
2023-02-13 09:19:29 -08:00
Todd Neal
69f04a2fc1
update comment to match implementation
2023-01-27 13:59:40 -06:00
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