Commit Graph

64 Commits

Author SHA1 Message Date
Ania Borowiec
4205f04ce3 Replace uses of reflect.DeepEqual with cmp.Diff in pkg/scheduler tests 2025-02-26 09:27:51 +00:00
ndixita
6db40446de Scheduler changes:
1. Use pod-level resource when feature is enabled and resources are set at pod-level
2. Edge case handling: When a pod defines only CPU or memory limits at pod-level (but not both), and container-level requests/limits are unset, the pod-level requests stay empty for the resource without a pod-limit. The container's request for that resource is then set to the default request value from schedutil.
2024-11-08 03:00:54 +00:00
Kensei Nakada
83f9e4b6df cleanup: remove event list 2024-10-18 11:10:10 +10:00
AxeZhan
b1f07bb36c add tests for scheduler 2024-10-10 15:53:19 +08:00
dom4ha
903b1f7e28 more fine-grained Node QHint for NodeResourceFit plugin 2024-09-26 09:51:36 +00:00
googs1025
69831b0043 chore(scheduler): refactor import package ordering 2024-09-18 20:31:03 +08:00
Kensei Nakada
4a81a85449 chore(noderesourcefit): correct tests and clean up comments 2024-09-17 13:28:27 +09:00
Kensei Nakada
fe3ab649d0 feat: remove node general update event from EventsToRegister when QHint is enabled 2024-09-14 16:15:40 +09:00
dom4ha
e7827879db Enable testing logger in the remaining scheduler tests. 2024-09-09 21:59:24 +00:00
Kensei Nakada
8519d3399f chore: move the scheduler internal components out of internal dir 2024-08-25 13:10:29 +09:00
Kensei Nakada
fa8092f838 support UpdatePodScaleDown instead of UpdatePodRequest 2024-07-20 19:20:38 +09:00
Kensei Nakada
0cd1ee4259 add(scheduler/framework): implement smaller Pod update events 2024-07-20 17:44:23 +09:00
googs1025
a3978e8315 scheduler: Add ctx param and error return to EnqueueExtensions.EventsToRegister() 2024-07-18 12:22:17 +08:00
AxeZhan
d66f8f9413 schedulingQueue update pod by queueHint 2024-06-12 21:26:09 +08:00
Tim Hockin
467d5d745c Get rid of unused API type NodeResources 2024-03-01 15:13:50 -08:00
Kubernetes Prow Robot
e04316a68a Merge pull request #121954 from AxeZhan/nodeInfo
Sched framework: expose NodeInfo in all functions of PluginsRunner interface
2023-12-15 18:33:00 +01:00
Kubernetes Prow Robot
195bb67d36 Merge pull request #119177 from carlory/fix-118893-3
noderesourcefit: scheduler queueing hints
2023-12-15 17:17:19 +01:00
AxeZhan
be48c93689 Sched framework: expose NodeInfo in all functions of PluginsRunner interface 2023-12-15 11:30:06 +08:00
carlory
9e1adced5d noderesourcefit: scheduler queueing hints
Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
2023-12-13 10:02:52 +08:00
kunwuluan
a00a610d15 move SidecarContainers featureGate checking
to PreFilter

Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
2023-11-06 10:46:52 +08:00
Mengjiao Liu
a7466f44e0 Change the scheduler plugins PluginFactory function to use context parameter to pass logger
- Migrated pkg/scheduler/framework/plugins/nodevolumelimits to use contextual logging
- Fix golangci-lint validation failed
- Check for plugins creation err
2023-09-20 17:49:54 +08:00
Gunju Kim
7286d122fb Mark pods with restartable init containers as UnschedulableAndUnresolvable
This marks the pods with restartable init containers as
`UnschedulableAndUnresolvable` if the feature gate is disabled to avoid
the inconsistency in resource calculation between the scheduler and the
older kubelet.
2023-07-08 07:26:13 +09:00
Kensei Nakada
6f8d38406a feature(scheduler): implement ClusterEventWithHint to filter out useless events 2023-06-22 13:36:19 +00:00
Mengjiao Liu
1c05cf1d51 kube-scheduler: NewFramework function to pass the context parameter
Co-authored-by: Aldo Culquicondor <1299064+alculquicondor@users.noreply.github.com>
2023-05-23 10:17:34 +08:00
Kubernetes Prow Robot
94a15929cf Merge pull request #116408 from ChenLingPeng/fit
skip pod resource check when request is zero
2023-04-17 11:44:45 -07:00
tangwz
3766e060e5 Avoid using negative words in PreFilter and PreScore tests. 2023-03-12 15:06:26 +08:00
tangwz
be080584c6 scheduler(NodeResourcesFit & NodeResourcesBalancedAllocation): calculatePodResourceRequest in PreScore phase (#115655)
* scheduler(NodeResourcesFit): calculatePodResourceRequest in PreScore phase

* scheduler(NodeResourcesFit and NodeResourcesBalancedAllocation): calculatePodResourceRequest in PreScore phase

* modify the comments and tests.

* revert the tests.

* don't need consider nodes.

* use list instead of map.

* add comment for podRequests.

* avoid using negative wording in variable names.
2023-03-10 07:44:53 -08:00
forrestchen
bbf2b968c8 skip pod resource check when request is zero
Signed-off-by: forrestchen <forrestchen@tencent.com>
2023-03-09 17:05:11 +08:00
Kubernetes Prow Robot
9d7db70882 Merge pull request #116066 from yoongon/feature/fit-test-comments
Fix comments at fit_test.go to increase redability
2023-03-06 20:52:16 -08:00
Yoon Park
8d2c81e7ec Fix comments at fit_test.go to increase redability 2023-03-04 13:03:15 +09:00
vinay kulkarni
231849a908 In-place Pod Vertical Scaling - Scheduler changes 2023-02-24 18:14:21 +00:00
tangwz
a4ab559ba4 Improve performance of NodeResourcesFit scoring
Signed-off-by: tangwz <tangwz.com@gmail.com>
2022-12-21 23:23:47 +08:00
Abirdcfly
bf8570029e chore(scheduler): cleanup some minor issues in testing 2022-11-03 09:07:28 +08:00
Kubernetes Prow Robot
f0fa987c05 Merge pull request #111544 from jlsong01/fix_resource_req_zero
fix pod created failed when resource request is 0
2022-09-02 10:56:05 -07:00
kerthcet
97e3e50493 Remove potential goroutine leak in NewFramework
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-08-06 00:05:22 +08: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
jlsong01
27824fb06a fix pod created failed when resource request is 0 2022-08-02 23:41:53 +08:00
Wojciech Tyczyński
7060953b92 Clear shutdown of scheduler metrics recorder 2022-05-20 20:23:29 +02:00
Paco Xu
acd696266e mark PodOverhead to GA in v1.24; remove in v1.26 2022-03-17 09:30:14 +08:00
Abdullah Gharaibeh
5b20b68bc9 Updated the scheduler framework's PreFilter interface to return a PreFilterResult 2022-03-14 15:36:52 -04:00
boenn
cec2aae1e5 rebase master 2021-11-25 11:21:12 +08:00
kerthcet
e5dd375b14 refactor scheudler's node resource plugins
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-11-03 00:52:23 +08:00
yuzhiquan
deb14b995a Add score plugin for NodeResourcesFit 2021-06-29 13:16:55 -04:00
Mike Dame
5a77ebe28b Scheduler: remove pkg/features dependency from NodeResources plugins 2021-05-18 08:59:02 -04:00
Jan Chaloupka
7286f9712a pkg/scheduler: drop Resource.ResourceList() method
The method is used only for testing purposes. Given Resource data type
exposes all its fields, any invoker of ResourceList that is still
using the method outside of kubernetes/kubernetes can still either
copy paste the original implementation or implement a custom method
that's converting resources into proper Quantity data type.

Given the hugepage resource is a scalar resource, it's sufficient
the underlying code under fit_test.go to take into account any
extended resources. For predicate_test.go, the hugepage
resource does not play any role as the General predicates test cases
does not set any scaler resource at all.

Additionally, by removing ResourceList method, pkg/scheduler/framework
can get rid of dependency on k8s.io/kubernetes/pkg/apis/core/v1/helper.
2021-04-28 16:26:33 +02:00
Dave Chen
a0d93cc0c8 Move NodeResourcesFit plugin args validation to apis/config/validation
Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-03-23 16:09:53 +08:00
tanjing2020
61cd099bc1 Use %w instead of %v to format errors 2021-03-08 10:23:08 +08:00
drfish
0c3d8b9720 Organize framework unit tests in subtests 2021-01-31 13:34:52 +08:00
Wei Huang
fb782eee57 Honor disabled LocalStorageCapacityIsolation in scheduling 2020-11-02 13:21:08 -08:00
Ali
09b2e8f638 Move scheduler interface to pkg/scheduler/framework 2020-10-13 13:13:27 +11:00