Commit Graph

67 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
f38ff3feea
Merge pull request #121716 from kerthcet/cleanup/add-log
Add more logs to scheduler event handler
2024-01-15 16:23:19 +01:00
amewayne
71c3593f85 support nodeAnnotationsChanged event to trigger rescheduling 2024-01-10 22:38:54 +08:00
kerthcet
e5b86c1034 Fix node update event will miss some potential changes
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-11-27 15:33:47 +08:00
kerthcet
a96d21b4b0 Add logs for event handler
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-11-03 15:36:06 +08:00
Patrick Ohly
c682d2b8c5 scheduler: add ResourceClass events
When filtering fails because a ResourceClass is missing, we can treat the pod
as "unschedulable" as long as we then also register a cluster event that wakes
up the pod. This is more efficient than periodically retrying.
2023-09-06 11:14:08 +02:00
Patrick Ohly
5269e76990 scheduler: properly skip DRA events
Because of a misplaced `append` (should have been inside if clause, not after
it), some handler from a previous loop iteration was added again. This was
harmless because the resulting slice was only used for waiting for cache sync,
but should better get fixed anyway.
2023-08-28 17:55:44 +02: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
Mengjiao Liu
074900e81b scheduler: update the scheduler interface and cache methods to use contextual logging 2023-05-29 13:26:32 +08:00
Patrick Ohly
fec5233668 api: resource.k8s.io PodScheduling -> PodSchedulingContext
The name "PodScheduling" was unusual because in contrast to most other names,
it was impossible to put an article in front of it. Now PodSchedulingContext is
used instead.
2023-03-14 10:18:08 +01:00
Patrick Ohly
29941b8d3e api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.
2023-03-14 07:52:03 +01:00
Patrick Ohly
d2ff210c20 scheduler: add dynamic resource allocation plugin
The plugin handles the interaction with ResourceClaims that are referenced by a
Pod.
2022-11-11 21:58:03 +01:00
Kubernetes Prow Robot
24a71990e0
Merge pull request #108445 from pohly/storage-capacity-ga
storage capacity GA
2022-03-23 08:06:21 -07:00
Paco Xu
acd696266e mark PodOverhead to GA in v1.24; remove in v1.26 2022-03-17 09:30:14 +08:00
Patrick Ohly
f84f4fa291 storage capacity: use V1 API 2022-03-14 20:05:45 +01: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
Kubernetes Prow Robot
0dcd6eaa0d
Merge pull request #103934 from boenn/tainttoleration
De-duplicate predicate (known as filter now) logic shared in kubelet and scheduler
2022-02-09 16:53:46 -08:00
BinacsLee
1027b8de40 scheduler: fix race condition during cache refresh 2021-12-10 20:46:12 +08:00
boenn
cec2aae1e5 rebase master 2021-11-25 11:21:12 +08:00
Aldo Culquicondor
ff741f6a96 Ensure deletion of pods in queues and cache
When the client misses a delete event from the watcher, it will use the last state of the pod in the informer cache to produce a delete event. At that point, it's not clear if the pod was in the queues or the cache, so we should issue a deletion in both.

The pod could be assumed, so deletion of assumed pods from the cache should work.

Change-Id: I11ce9785de603924fc121fe2fa6ed5cb1e16922f
2021-11-03 14:00:31 -04:00
kerthcet
fc9533e72f remove scheduler ServiceAffinity plugin
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-10-15 22:10:31 +08:00
Kensei Nakada
0bb4c14519
scheduler: delete docs related to equivalence cache from scheduler (#105417)
* Delete: delete docs related to equivalence cache from scheduler

* Fix: re-add comment about ServiceAffinity
2021-10-04 16:23:49 -07:00
00255991
06a9bfbb21 Add unit tests for scheduler's dynamic event handlers registration 2021-09-14 22:51:52 +08:00
Wei Huang
dc079acc2b
sched: retry unschedule pods immediately after a waiting pod's deletion 2021-08-06 19:08:37 -07:00
Yecheng Fu
83ee392ed4 implement EnqueueExtensions interface in volumebinding 2021-07-03 08:25:06 +08:00
Wei Huang
1b3a124ba6
Scheduler now registers event handlers dynamically
- move clusterEventMap to Configurator
- dynamic event handlers registration for core API resources
- dynamic event handlers registration for custom resources
2021-05-21 13:47:06 -07:00
Mike Dame
5a77ebe28b Scheduler: remove pkg/features dependency from NodeResources plugins 2021-05-18 08:59:02 -04:00
Alexander Minbaev
8325c6b0da got rid of ClusterEventReg with generating ClusterEvent objects on the fly 2021-04-14 13:38:46 -05:00
Kubernetes Prow Robot
b678d1b51d
Merge pull request #100444 from july2993/mode
Change go file mode from 755 to 644
2021-04-08 22:09:22 -07:00
Kubernetes Prow Robot
ae40c62c49
Merge pull request #100286 from tanjing2020/skip_updates_assumed_pods
Scheduler: skip updates of assumed pods
2021-04-08 20:29:29 -07:00
tanjing2020
d4465b995e Scheduler: skip updates of assumed pods 2021-03-24 10:01:22 +08:00
Jiahao Huang
4621722888 Change go file mode from 755 to 644
to check all file:
find . -perm 755 | grep "\.go$"
2021-03-23 10:50:17 +08:00
Wei Huang
6384f397b4
sched: support PreEnqueueChecks prior to moving Pods 2021-03-11 12:31:50 -08:00
yahaa
22a8a9ab45 fix gosimple lint check
Signed-off-by: yahaa <1477765176@qq.com>
2021-03-06 19:57:36 +08:00
tanjing2020
d2b24a664e Add detailed logs and start log messages with upper case 2021-02-22 09:22:34 +08:00
Kubernetes Prow Robot
2b6a8381d2
Merge pull request #98875 from tanjing2020/change-log
migrate to structured logging
2021-02-19 07:48:25 -08:00
Wei Huang
04a40d1f18
sched: remove Unknown queuing literal 2021-02-10 11:03:07 -08:00
tanjing2020
300d109d78 migrate to structured logging 2021-02-10 16:11:52 +08:00
Kubernetes Prow Robot
07bd985724
Merge pull request #96561 from ialidzhikov/cleanup/csi-node-info
Remove CSINodeInfo feature gate
2021-01-05 11:46:00 -08:00
Alex Dudko
c03b4c7850 Migrate pkg/scheduler logs to structured logging
in pkg/scheduler/eventhandlers.go
  * add event for unscheduled pod
  * delete event for unscheduled pod
  * add event for scheduled pod
  * delete event for scheduled pod

in pkg/scheduler/framework/plugins/defaultbinder/default_binder.go
  * Attempting to bind pod to node

in pkg/scheduler/scheduler.go
  * Updating pod condition
  * Attempting to schedule pod
  * Skip schedule deleting pod
2020-12-18 10:45:00 -08:00
ialidzhikov
bc432124a2 Remove CSINodeInfo feature gate
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2020-12-10 09:58:22 +02:00
lixiaobing1
2cba0a02f7 fix note delete to update according to code 2020-11-11 09:50:47 +08:00
Wei Huang
6e0fb9ad7f
Ignore specific Pod update events in scheduler 2020-11-09 20:35:01 -08:00
tangwz
5f3efa671d scheduler: make Profile an interface. 2020-10-27 09:13:04 +08:00
Wei Huang
d8def59871
Initialize scheduler's podInformer in sharedInformerFactory
Scheduler's specific podInfomer is now initialized inside the sahredInformerFactory.
2020-09-08 12:57:17 -07:00
Wei Huang
d99cc01646
Register and enable defaultpreemption plugin
- Enable defaultpreemption as a PostFilter plugin
- Remote legacy hard-coded preemption logic
2020-06-22 17:22:27 -07:00
Wei Huang
196056d7fe
Introduce a defaultpreemption PostFilter plugin
- Add a defaultpreemption PostFilter plugin
- Make g.Preempt() stateless
    - make g.Preempt() stateless
    - make g.getLowerPriorityNominatedPods() stateless
    - make g.processPreemptionWithExtenders() stateless
2020-06-19 09:13:55 -07:00
Aldo Culquicondor
da6fcfaf74 Skip Pod Conditions from scheduling queue updates
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-05-19 10:59:10 -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
Kubernetes Prow Robot
52ae8b1ebb
Merge pull request #91099 from snowplayfire/skip_unnecessary_scheduling
skip unnecessary scheduling attempt when pod has its Finalizers updated
2020-05-15 23:02:22 -07:00