Commit Graph

254 Commits

Author SHA1 Message Date
NoicFank
31a4b13238 enhancement(scheduler): share waitingPods among profiles 2024-05-17 17:07:27 +08:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
kerthcet
84750fe52e Revert "enhancement(scheduler): share waitingPods among profiles"
This reverts commit 227c1915db.
2024-03-19 22:52:59 +01:00
kerthcet
a67d1dc010 Revert "Fix flaky test on multi profiles waiting pod"
This reverts commit 5b072a59a2.
2024-03-19 22:52:07 +01:00
Kensei Nakada
2b56de43e5 register Node/UpdateNodeTaint event to plugins which has Node/Add only, doesn't have Node/UpdateNodeTaint 2024-03-16 14:13:06 +00:00
Patrick Ohly
096e948905 dra scheduler: support structured parameters
When a claim uses structured parameters, as indicated by the resource class
flag, the scheduler is responsible for allocating it. To do this it needs to
gather information about available node resources by watching
NodeResourceSlices and then match the in-tree claim parameters against those
resources.
2024-03-07 22:21:04 +01:00
kerthcet
5b072a59a2 Fix flaky test on multi profiles waiting pod
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-03-05 14:54:33 +08:00
kerthcet
b3ba6bda2b Add missed clusterEvents to UnrollWildCardResource
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-02-19 11:55:50 +08:00
NoicFank
227c1915db enhancement(scheduler): share waitingPods among profiles 2024-02-01 10:06:23 +08:00
Toru Komatsu
01916625da
Remove unnecessary error catch in scheduling failure (#121981)
* Deleted from the cache in the handling of scheduling failures due to missing Node

Signed-off-by: utam0k <k0ma@utam0k.jp>

* Support only `nodes`

* Remove unnecessary error catch

Signed-off-by: utam0k <k0ma@utam0k.jp>

* Fix a build error

Signed-off-by: utam0k <k0ma@utam0k.jp>

* Fix a build error

Signed-off-by: utam0k <k0ma@utam0k.jp>

---------

Signed-off-by: utam0k <k0ma@utam0k.jp>
2023-12-14 05:09:08 +01:00
kerthcet
f77a4543d1 Unregister events in schedulingGates plugin
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-11-06 10:01:13 +08:00
Kensei Nakada
c7842d9c63 narrow down the scope of EnqueueExtensions to subscribe less cluster events 2023-10-27 14:14:37 +00:00
Kubernetes Prow Robot
fd5c406112
Merge pull request #120933 from mengjiao-liu/contextual-logging-scheduler-remaining-part
kube-scheduler: convert the remaining part to use contextual logging
2023-10-27 10:30:58 +02:00
kerthcet
b1ce529b2a Remove unnecessary GetIndexer
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-10-24 23:03:34 +08:00
Mengjiao Liu
bd8ac8c7fa kube-scheduler: checked err for golangci-lint 2023-10-24 17:56:59 +08:00
Mengjiao Liu
b0a73213d6 kube-scheduler: convert the remaining part to use contextual logging 2023-10-24 17:56:48 +08:00
Kubernetes Prow Robot
3ac83f528d
Merge pull request #119290 from carlory/add-logger
the scheduling queue logs the error and treats it as QueueAfterBackoff
2023-09-22 08:10:49 -07: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
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
Stephen Kitt
9990307146
kube-scheduler: drop deprecated pointer package
This replaces deprecated k8s.io/utils/pointer functions with their ptr
equivalent.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-09-13 09:42:19 +02:00
kerthcet
6fbb8ec7e4 Move scheduler testing utils to /scheduler/testing
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-09-12 13:42:38 +08:00
Kensei Nakada
34640772ed implement SchedulerQueueingHints feature gate 2023-07-14 12:31:27 +00:00
carlory
0599b3caa0 change the QueueingHintFn to pass a logger 2023-07-13 00:56:41 +08:00
Kensei Nakada
be0db3f93d clean up the implementation around QueueingHintFn 2023-07-06 16:07:39 +00:00
Kensei Nakada
6f8d38406a feature(scheduler): implement ClusterEventWithHint to filter out useless events 2023-06-22 13:36:19 +00:00
Mengjiao Liu
074900e81b scheduler: update the scheduler interface and cache methods to use contextual logging 2023-05-29 13:26:32 +08: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
sarab
8d18ae6fc2 Use the generic Set in scheduler 2023-04-09 11:34:17 +05:30
kidddddddddddddddddddddd
6ca62eb2cb refactor 2022-12-13 11:36:12 +08:00
kerthcet
f7f857814f Refactor schedulingCycle and bindingCycle in scheduler
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-10-21 13:53:18 +08:00
Yuan Chen
7297f48f12 Add profile level percentageOfNodesToScore
Fix conversion errors

Changed the order

update

update

fix manaul coversions

keep the global parameter for backward compatibility

Address Wei's comments

Fix an error

Fix issues

Add unit tests for validation

Fix a comment

Address comments

Update comments

fix verifiation errors

Add tests for scheme_test.go

Convert percentageOfNodesToScore to pointer

Fix errors

Resolve conflicts

Fix testing errors

Address Wei's comments

Revert IntPtr to Int changes

Address comments

Not overrite percentageOfNodesToScore

Fix a bug

Fix a bug

change errs to err

Fix a nit

Remove duplication

Address comments

Fix lint warning

Fix an issue

Update comments

Clean up

Address comments

Revert changes to defaults

fix unit test error

Update

Fix tests

Use default PluginConfigs
2022-10-14 13:01:06 -07:00
kidddddddddddddddddddddd
b901ef0f68 changes in test files 2022-10-12 22:11:04 +08:00
kerthcet
127178661d Remove newScheduler to simplify instantiation
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-10-10 10:25:37 +08:00
Kubernetes Prow Robot
15a5136c26
Merge pull request #111726 from Huang-Wei/debug-pendingpods
Expose a pending pods summary in scheudler's dummper output
2022-08-23 17:17:49 -07:00
Wei Huang
7df9bfcfef
Expose a pending pods summary in scheudler's dummper output 2022-08-05 22:02:38 -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
Francesco Romani
b4e015bf3c sched: schedfwk: init indexers with non-nil map
Using a nil map to initialize the pod indexers will
cause runtime failure when trying to add indexers
in scheduler plugin.
We use a empty map to enable scheduler plugins
to add their indexers.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2022-07-13 09:24:57 +02:00
Wei Huang
4f77732540
merge MakeDefaultErrorFunc into handleSchedulingFailure 2022-07-12 12:11:16 -07:00
kerthcet
e54ce7c0c6 Cleanup: Pass context to client calls in scheduler/volumebinding tests
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-06-13 23:53:23 +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
Kante
9bb76ecf00
migrate scheduling logic to schedule_one.go as more reasonable (#109045)
* refactor: migrate scheduling logic to scheduler_one.go as more reasonable

Signed-off-by: kerthcet <kerthcet@gmail.com>

* remove snapshot() function

Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-03-27 08:51:20 -07:00
Konstantin Misyutin
4ba98a8610 cleanup: remove unnecessary import aliases 2022-03-16 15:43:09 +08:00
Konstantin Misyutin
1d7cefe9c4 Move volume helpers to "k8s.io/component-helpers/storage/volume".
This patch aims to simplify decoupling "pkg/scheduler/framework/plugins"
from internal "k8s.io/kubernetes" packages. More described in
issue #89930 and PR #102953.

Some helpers from "k8s.io/kubernetes/pkg/controller/volume/persistentvolume"
package moved to "k8s.io/component-helpers/storage/volume" package:

- IsDelayBindingMode
- GetBindVolumeToClaim
- IsVolumeBoundToClaim
- FindMatchingVolume
- CheckVolumeModeMismatches
- CheckAccessModes
- GetVolumeNodeAffinity

Also "CheckNodeAffinity" from "k8s.io/kubernetes/pkg/volume/util"
package moved to "k8s.io/component-helpers/storage/volume" package
to prevent diamond dependency conflict.

Signed-off-by: Konstantin Misyutin <konstantin.misyutin@huawei.com>
2022-03-16 15:43:09 +08:00
Kubernetes Prow Robot
d7bd0d4f52
Merge pull request #108648 from ahg-g/ahg-ds
Update PreFilter interface to return a PreFilterResult
2022-03-14 18:50:20 -07:00
Abdullah Gharaibeh
5b20b68bc9 Updated the scheduler framework's PreFilter interface to return a PreFilterResult 2022-03-14 15:36:52 -04:00
sanposhiho
3b13e9445a Add MinDomains API to TopologySpreadConstraints field 2022-03-09 20:57:12 +09:00
ruquanzhao
36b65fb63f Remove generic_scheduler.go and generic_scheduler_test.go
Signed-off-by: Ruquan Zhao <ruquan.zhao@arm.com>
2022-03-07 17:52:08 +08:00
Ruquan Zhao
f1a5b6ca06 Remove genericScheduler and SchedulerAlgorithm.
Signed-off-by: Ruquan Zhao <ruquan.zhao@arm.com>
2022-03-04 13:26:46 +08:00
kerthcet
eafbaad9f7 refactor: rename SchedulerCache to Cache in Scheduler
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-02-24 09:47:21 +08:00
Kante
62eb70c1b3
reuse InformerFactory in scheduler tests (#107835)
* reuse informer in scheduler tests

Signed-off-by: kerthcet <kerthcet@gmail.com>

* reduce construct two informers

Signed-off-by: kerthcet <kerthcet@gmail.com>

* instantiate formerfacotry error

Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-02-09 16:53:58 -08:00