Commit Graph

97 Commits

Author SHA1 Message Date
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
kidddddddddddddddddddddd
f5a69ffda9
feature(scheduler): won't run Score if PreScore returned a Skip status (#115652)
* allow preScore to return skip status to skip running the corresponding score extension

* add test case for all skipped

* add test case for select host

* update plugin status

* skip score when all plugins are skipped

* update
2023-02-13 14:53:29 -08:00
HirazawaUi
3b18e80fb4 delete unused functions in pkg directory 2023-01-16 21:43:36 +08:00
Kensei Nakada
e5b536755f feature(scheduler): won't run Filter if PreFilter returned a Skip status 2023-01-06 07:38:15 +00:00
Sathyanarayanan Saravanamuthu
bf4f907bfa Improving schedule extender test coverage
Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2022-12-05 12:10:10 +05:30
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
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
Chris Henzie
2d0afbc054 scheduler: integration test for ReadWriteOncePod alpha
Tests scheduler enforcement of the ReadWriteOncePod PVC access mode.

- Creates a pod using a PVC with ReadWriteOncePod
- Creates a second pod using the same PVC
- Observes the second pod fails to schedule because PVC is in-use
- Deletes the first pod
- Observes the second pod successfully schedules
2022-11-01 15:08:01 -07:00
ialidzhikov
7c8a151faa pkg/scheduler: Replace deprecated func usage from the k8s.io/utils/pointer pkg 2022-08-16 08:39:18 +03:00
kerthcet
97e3e50493 Remove potential goroutine leak in NewFramework
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-08-06 00:05:22 +08:00
Kubernetes Prow Robot
3902a53419
Merge pull request #111441 from denkensk/respect-topology
Respect PodTopologySpread after rolling upgrades
2022-07-30 01:40:42 -07:00
Alex Wang
f4bc904376 implementation for MatchLabelKeys in TopologySpreadConstraint
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2022-07-30 13:23:49 +08:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Wojciech Tyczyński
7060953b92 Clear shutdown of scheduler metrics recorder 2022-05-20 20:23:29 +02:00
kerthcet
790d983867 feat: implement NodeInclusionPolicy in TopologySpreadConstraint
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-11 07:51:18 +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
Yuan Chen
d1a2f699a7 Add PodWrapper functions for scheduler testing
Fix a typo in comment
2022-04-19 20:30:04 -07:00
Kubernetes Prow Robot
2b1b849d6a
Merge pull request #108362 from sanposhiho/implement-mindomains
Implement MinDomains on Pod Topology Spread
2022-03-15 10:34:11 -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
6141aa53f9 Implement MinDomains 2022-03-15 01:38:44 +09:00
sanposhiho
0b16a7fefa Support ExtenderName in FakeExtender 2022-02-23 12:14:39 +09: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
Abdullah Gharaibeh
33a04dc5f5 Added an integration test for NodeResourcesFit scoring 2021-11-30 12:13:30 -05: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
Wei Huang
b7d90ca991
sched: adjust events to register for VolumeBinding plugin 2021-10-07 08:51:04 -07:00
Dave Chen
6e1835b83b Fix couple of incorrect description
Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-09-08 10:08:23 +08:00
Wei Huang
dc079acc2b
sched: retry unschedule pods immediately after a waiting pod's deletion 2021-08-06 19:08:37 -07:00
Abdullah Gharaibeh
265ef1741f Move scheduler plugin set and configuration defaulting to component config 2021-06-16 10:15:29 -04:00
Abdullah Gharaibeh
6c0976814c use ownerReference to build default spreading contraints in the scheduler 2021-05-25 16:04:48 -04:00
Wei Huang
6384f397b4
sched: support PreEnqueueChecks prior to moving Pods 2021-03-11 12:31:50 -08:00
Mengxue Zhang
b38caa91cc make runtime.NewFramework accept KubeSchedulerProfile 2021-03-05 18:30:21 +00:00
Mengxue Zhang
7d1ab94b9a remove useless pluginConfigs 2021-03-03 05:14:36 +00:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Kubernetes Prow Robot
838bb6a567
Merge pull request #98663 from gavinfish/sched-remove-plugin-pt
Scheduler: change config.Plugins from pointers to objects
2021-02-10 15:36:15 -08:00
drfish
74315f9c56 Change config.Plugins from pointers to objects 2021-02-10 23:45:59 +08:00
Yecheng Fu
9a2713503a multiple extenders and UnschedulableAndUnresolvable takes precedence
over Unschedulable
2021-01-29 11:32:43 +08:00
Tim Hockin
819ff9b087
Use topology labels instead of old beta names (#96033)
* Rename const for topology.../zone

* Rename const for topology.../region

* Rename const for failure-domain.../zone

* Rename const for failure-domain.../region

* Restore old names for compat
2020-11-05 20:26:50 -08:00
Aldo Culquicondor
15d2ab1615 Fix labels for spreading benchmark
Nodes where being created with beta zone label, whereas the service was using stable.

Change-Id: I08ba1b6c083217759524236bde3888e527b4a44f
2020-10-21 15:51:44 -04:00
Ali
09b2e8f638 Move scheduler interface to pkg/scheduler/framework 2020-10-13 13:13:27 +11: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
Kubernetes Prow Robot
a4103dfeaf
Merge pull request #92819 from chendave/cleanup_machine
Change the node name from "machine" to "node"
2020-08-27 19:06:57 -07:00
Yecheng Fu
1176ef9c7d forget the pod when the reserve plugins fail
and move the metrics function calls before all other functions
2020-08-11 21:28:33 +08:00
Dave Chen
a1b2a7765d Change the node name from "machine" to "node"
Latest change on master rename the node name from "machine" to "node"
but haven't update all the affected code, which causes some of testcases
invalid.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-07-10 10:17:58 +08:00
Abdullah Gharaibeh
c98dee4945 Return a FitError when PreFilter fails with unschedulable status 2020-07-06 15:02:07 -04:00
He Jie Xu
b3741f344e The Pod is eligible to preempt when previous nominanted node is UnschedulableAndUnresolvable
If the Pod's previous nominated node is UnschedulableAndUnresolvable from previous
filtering, it should be considered for preemption again.
2020-07-03 08:57:45 +08:00
Wei Huang
7362fccdd7
Polish unit tests of defaultpreemptio plugin 2020-06-30 14:05:48 -07:00
Andrea Nodari
2e1042f959 Use NodeWrapper to directly initialize node with labels
Using NodeWrapper in the integration tests gives more flexibility when
creating nodes. For instance, tests can create nodes with labels or
with a specific sets of resources.

Also, NodeWrapper initialises a node with a capacity of 32 pods, which
can be overridden by the caller. This makes sure that a node is usable
as soon as it is created.
2020-06-30 17:18:15 +02:00
Adhityaa Chandrasekar
ec83143342 scheduler: merge Reserve and Unreserve plugins
Previously, separate interfaces were defined for Reserve and Unreserve
plugins. However, in nearly all cases, a plugin that allocates a
resource using Reserve will likely want to register itself for Unreserve
as well in order to free the allocated resource at the end of a failed
scheduling/binding cycle. Having separate plugins for Reserve and
Unreserve also adds unnecessary config toil. To that end, this patch
aims to merge the two plugins into a single interface called a
ReservePlugin that requires implementing both the Reserve and Unreserve
methods.
2020-06-24 21:10:35 +00:00