Commit Graph

321 Commits

Author SHA1 Message Date
AxeZhan
cf73c9d93c remove EvaluatedNodes field in Diagnosis struct 2024-06-04 14:20:55 +08:00
NoicFank
31a4b13238 enhancement(scheduler): share waitingPods among profiles 2024-05-17 17:07:27 +08:00
Wojciech Tyczyński
7b38106255 Idempotent transformers in scheduler & kcm 2024-04-17 21:08:44 +02:00
kerthcet
84750fe52e Revert "enhancement(scheduler): share waitingPods among profiles"
This reverts commit 227c1915db.
2024-03-19 22:52:59 +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
NoicFank
227c1915db enhancement(scheduler): share waitingPods among profiles 2024-02-01 10:06:23 +08:00
Kubernetes Prow Robot
5b979a3a53
Merge pull request #122498 from Gekko0114/close
Allow framework plugins to be closed
2024-01-08 17:30:36 +01:00
moriya
288c00c0c7 Allow framework plugins to be closed 2024-01-06 10:11:19 +09:00
Kensei Nakada
09abd6be5a address reviews 2024-01-02 02:10:41 +00:00
kerthcet
f77a4543d1 Unregister events in schedulingGates plugin
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-11-06 10:01:13 +08:00
Mengjiao Liu
b0a73213d6 kube-scheduler: convert the remaining part to use contextual logging 2023-10-24 17:56:48 +08:00
Kensei Nakada
cb5dc46edf feature(scheduler): simplify QueueingHint by introducing new statuses 2023-10-19 11:02:11 +00: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
Eric Lin
f93bd699aa Trim managedFields in pod informer
Signed-off-by: Eric Lin <exlin@google.com>
2023-08-20 13:09:15 +00:00
Kensei Nakada
c7e7eee554
feature(scheduling_queue): track events per Pods (#118438)
* feature(sscheduling_queue): track events per Pods

* fix typos

* record events in one slice and make each in-flight Pod to refer it

* fix: use Pop() in test before AddUnschedulableIfNotPresent to register in-flight Pods

* eliminate MakeNextPodFuncs

* call Done inside the scheduling queue

* fix comment

* implement done() not to require lock in it

* fix UTs

* improve the receivedEvents implementation based on suggestions

* call DonePod when we don't call AddUnschedulableIfNotPresent

* fix UT

* use queuehint to filter out events for in-flight Pods

* fix based on suggestion from aldo

* fix based on suggestion from Wei

* rename lastEventBefore → previousEvent

* fix based on suggestion

* address comments from aldo

* fix based on the suggestion from Abdullah

* gate in-flight Pods logic by the SchedulingQueueHints feature gate
2023-07-17 15:53:07 -07: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
kidddddddddddddddddddddd
9c7166ff63 wait for eventhandlers to sync before run scheduler 2023-06-27 23:19:34 +08:00
Kensei Nakada
6f8d38406a feature(scheduler): implement ClusterEventWithHint to filter out useless events 2023-06-22 13:36:19 +00:00
SataQiu
410b6023d6 scheduler: fix code style issues for pkg/scheduler 2023-06-05 17:29:49 +08: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
yanggang
a6173fad88
Delete duplicate code in schedule.go
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-04-12 15:38:05 +08:00
sarab
8d18ae6fc2 Use the generic Set in scheduler 2023-04-09 11:34:17 +05:30
Kensei Nakada
6697467062 add(scheduler): implement "plugin_execution_duration_seconds" metric in PreEnqueue 2023-03-12 04:45:52 +00:00
Aldo Culquicondor
07a73bb2e1
One lock among PodNominator and SchedulingQueue
Change-Id: I17fe5da40250e42c04124c25b530ce6c8dea4154
2023-03-08 16:18:36 -05:00
kidddddddddddddddddddddd
6ca62eb2cb refactor 2022-12-13 11:36:12 +08:00
Wei Huang
0b27f25252
PreEnqueue implementation
- Add PreEnqueuePlugin to Scheduler Framework
- Implement PreEnqueuePlugin in scheduler queue
- Implementation of SchedulingGates plugin
- Metrics
2022-11-07 14:02:58 -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
kerthcet
127178661d Remove newScheduler to simplify instantiation
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-10-10 10:25:37 +08:00
kerthcet
02f77a1b84 Feat: ga component config in kube-scheduler
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-07-29 08:47:48 +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
72e8fc1d87 Fix: pod's deadline shoud be nil when cache ttl is 0
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-07-05 23:29:31 +08:00
Kapil Jain
4706dda5da Added code for disable scheduler cache expiry 2022-07-04 23:46:59 +05:30
Wojciech Tyczyński
fe3616cafb Clean shutdown of kcm, ccm and scheduler 2022-05-26 12:36:59 +02:00
Wojciech Tyczyński
7060953b92 Clear shutdown of scheduler metrics recorder 2022-05-20 20:23:29 +02: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
Alex Wang
8a5df1302a rename unschedulableQ to unschedulablePods
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2022-03-24 17:38:49 +08:00
zzr93
3c57a9e106 clean an unnecessary else 2022-03-21 16:47:00 +08:00
kerthcet
5ecaeb325f refactor: remove configurator in scheduler
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-03-20 23:57:26 +08:00
Abdullah Gharaibeh
5b20b68bc9 Updated the scheduler framework's PreFilter interface to return a PreFilterResult 2022-03-14 15:36:52 -04: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
Kubernetes Prow Robot
d3ece70f0b
Merge pull request #108269 from kerthcet/refactor/rename-schedulercache-to-cache
refactor: rename SchedulerCache to Cache in Scheduler
2022-02-24 14:46:13 -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
Alex Wang
87549203e9 add deprecated flag for flush pods to activeq interval 2022-02-16 11:05:52 +08:00
Alex Wang
52275fc831 add preemption info in scheduling failed event 2022-02-01 00:37:16 +08:00