Commit Graph

115 Commits

Author SHA1 Message Date
Abdullah Gharaibeh
6d499ee9ea Correct event registration for multiple scheduler plugins. 2022-04-12 18:32:24 -04:00
Carlos Eduardo Arango Gutierrez
d2f67b42b7
Fix typos under pkg/scheduler
./scheduler/framework/plugins/noderesources/most_allocated_test.go:227: negtive ==> negative
./scheduler/framework/plugins/noderesources/most_allocated_test.go:228: negtive ==> negative
./scheduler/framework/plugins/volumebinding/binder.go:402: everytime ==> every time
./scheduler/framework/preemption/preemption_test.go:67: staus ==> status
./scheduler/framework/runtime/framework_test.go:1252: followings ==> following
./scheduler/internal/cache/cache_test.go:932: datas ==> data
./scheduler/internal/cache/node_tree_test.go:471: unknow ==> unknown
./scheduler/internal/queue/scheduling_queue_test.go:442: actived ==> activated
./scheduler/internal/queue/scheduling_queue_test.go:2209: covert ==> convert

Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2022-03-24 08:01:25 -04: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
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
Patrick Ohly
9eaa2dc554 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.
2022-01-12 07:48:36 +01:00
Kubernetes Prow Robot
d7f8234b6d
Merge pull request #106747 from ahg-g/ahg-test
Added an integration test for NodeResourcesFit scoring
2021-12-07 19:28:06 -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
hyschumi
7ad629c864 rm makeNodeWithExtendedResource method in noderesources unit test && doc: update least_allocated strategy detail doc 2021-11-18 09:15:26 +08:00
Kubernetes Prow Robot
6ac2d8edc8
Merge pull request #105967 from shivanshu1333/feature2/master/105841
Migrated scheduler files `preemption.go`, `stateful.go`, `resource_allocation.go` to structured logging
2021-11-09 10:28:01 -08:00
Shivanshu Raj Shrivastava
f4aad52885
migrated preemption.go, stateful.go, resource_allocation.go to structured logging 2021-11-08 22:52:47 +05:30
Kubernetes Prow Robot
ec8e6e8778
Merge pull request #106002 from kerthcet/feature/refactor-NodeResourcesFit-plugin
refactor scheudler's node resource plugins
2021-11-02 10:52:34 -07:00
kerthcet
e5dd375b14 refactor scheudler's node resource plugins
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-11-03 00:52:23 +08:00
Ahmad Diaa
a2c37bfd09
use original requests in NodeResourcesBalancedAllocation instead of NonZero (#105845) 2021-10-29 19:04:14 -07:00
Dave Chen
1fa673c15c Extent the NodeResourcesBalancedAllocation plugin to cover more resources
Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-06-30 11:15:12 +08:00
Kubernetes Prow Robot
e0f66be1aa
Merge pull request #101822 from yuzhiquan/NodeResourcesFit-score
Add score func for NodeResourcesFit plugin
2021-06-29 13:42:20 -07:00
yuzhiquan
deb14b995a Add score plugin for NodeResourcesFit 2021-06-29 13:16:55 -04:00
Wei Huang
20f84b12a1
Optimize scheduler res scorer on non-requested extended res 2021-06-25 11:41:36 -07:00
Kubernetes Prow Robot
72fc6d9ea0
Merge pull request #103089 from chendave/ratio_cleanup
Simplify the formula used in the `RequestedToCapacityRatio` plugin
2021-06-22 12:00:23 -07:00
ravisantoshgudimetla
b6c75bee15 Remove balanced attached node volumes
kubernetes#60525 introduced
Balanced attached node volumes feature gate to include volume
count for prioritizing nodes. The reason for introducing this
flag was its usefulness in Red Hat OpenShift Online environment
which is not being used any more. So, removing the flag
as it helps in maintainability of the scheduler code base
as mentioned at kubernetes#101489 (comment)
2021-06-22 11:19:30 -04:00
Dave Chen
0f922b200f Simplify the formula used in the RequestedToCapacityRatio plugin
Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-06-22 17:11:26 +08:00
Aldo Culquicondor
63d1237102 Fix Node Resources plugins score when there are pods with no requests
Given that we give a default CPU/memory requests for containers that don't provide any, the calculated usage can exceed the allocatable.

Change-Id: I72e249652acacfbe8cea0dd6f895dabe43ff6376
2021-06-16 20:36:07 +00:00
Abdullah Gharaibeh
46f3e4dfdd Define in-tree scheduler plugin names in separate pkg to break a cyclic depednecy when moving plugin defaulting to CC 2021-06-09 15:36:09 -04:00
Mike Dame
5a77ebe28b Scheduler: remove pkg/features dependency from NodeResources plugins 2021-05-18 08:59:02 -04:00
yuzhiquan
2b6af46624 fix potential panic for node resource plugin 2021-05-08 18:03:24 +08:00
Kubernetes Prow Robot
b4ea4322a6
Merge pull request #101467 from ingvagabund/noderesources-replace-IsScalerResourceName-with-nodeinfo-allocatable-scalar-resource-presence
noderesource: node info already knows which resources are scalar
2021-04-28 18:12:50 -07: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
Jan Chaloupka
11d6576f83 noderesource: node info already knows which resources are scalar
NodeInfo.Allocatable.ScalarResources already knows which resources
are scaler. Also, if the resource name is not present,
it's pointless to compute score for a resources the node can not allocate
since nodeInfo.Allocatable.ScalarResources[resource] is zero for the case.
And both leastRequestedScore and mostRequestedScore returns 0 score
for nodes with zero allocatable resource.
The balancedResourceScorer deals only with CPU and memory which
are not scalable resources.
2021-04-25 23:32:03 +02:00
Dave Chen
c6e65079c7 Validate plugin config for KubeSchedulerConfiguration
Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-04-14 09:30:20 +08:00
Kubernetes Prow Robot
ad84094a8f
Merge pull request #100477 from chendave/validation_noderesource
Move NodeResourcesFit plugin args validation to apis/config/validation
2021-04-08 22:09:56 -07: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
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
e86a72add7
implement EnqueueExtensions interface in noderesources 2021-03-08 15:24:05 -08:00
Kubernetes Prow Robot
2b3f97b08f
Merge pull request #99389 from tanjing2020/change-log
Use %w instead of %v to format errors
2021-03-08 12:07:12 -08:00
tanjing2020
61cd099bc1 Use %w instead of %v to format errors 2021-03-08 10:23:08 +08:00
Kubernetes Prow Robot
699b38669f
Merge pull request #99731 from AliceZhang2016/newFramework-accept-KubeSchedulerProfile
Make runtime.NewFramework accept KubeSchedulerProfile
2021-03-06 12:49:48 -08:00
Mengxue Zhang
b38caa91cc make runtime.NewFramework accept KubeSchedulerProfile 2021-03-05 18:30:21 +00:00
Yecheng Fu
21a43586e7 Prioritizing nodes based on volume capacity 2021-03-05 23:59:25 +08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
caodonghui
f435e24403 Remove deadcode 2021-02-23 17:58:47 +08:00
drfish
0c3d8b9720 Organize framework unit tests in subtests 2021-01-31 13:34:52 +08:00
Jie Shen
f82e3c430c Wrap all errors in pkg/scheduler 2021-01-28 09:13:40 +08:00
Kubernetes Prow Robot
5996839425
Merge pull request #96745 from lingsamuel/scheduler-validation
Use field.Error(s) in scheduler plugin args validation
2020-12-09 02:10:50 -08:00
Kubernetes Prow Robot
f367cb671a
Merge pull request #96774 from lixiaobing1/noderesources2
clarify the logic of noderesources comparison
2020-12-08 20:03:01 -08:00
Ling Samuel
77f0f442a1
Use field.Error(s) in scheduler plugin args validation
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2020-12-02 08:49:33 +08:00
lixiaobing1
e12fab6779 optimize the logic of noderesources comparision 2020-11-24 08:31:28 +08:00
lixiaobing1
8b351ac9d0 fix typos in type functionShapePoint 2020-11-19 20:22:09 +08:00
Kubernetes Prow Robot
43edb40632
Merge pull request #96092 from Huang-Wei/honor-false-LocalStorageCapacityIsolation
Honor disabled LocalStorageCapacityIsolation in scheduling
2020-11-02 17:12:15 -08:00
Wei Huang
fb782eee57
Honor disabled LocalStorageCapacityIsolation in scheduling 2020-11-02 13:21:08 -08:00