Commit Graph

813 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
ae1f28d7b0 Merge pull request #102306 from ahg-g/ahg-vol-restrictions
Return UnschedulableAndUnresolvable instead of Error when failing to lookup volume-related resources
2021-05-27 20:48:25 -07:00
Kubernetes Prow Robot
2da8d1c18f Merge pull request #102234 from sanposhiho/scheduler/add/interface-check-on-nodeaffinity
scheduler/add: interface check on nodeaffinity
2021-05-26 03:17:32 -07:00
Kubernetes Prow Robot
aa0017ad13 Merge pull request #102236 from ahg-g/ahg-spread
Use ownerReference to build default spreading constraints
2021-05-25 19:39:28 -07:00
Abdullah Gharaibeh
17551f291d Return UnschedulableAndUnresolvable instead of Error when failing to lookup pvc or storageclass in VolumeZone plugin 2021-05-25 18:58:11 -04:00
Abdullah Gharaibeh
6c0976814c use ownerReference to build default spreading contraints in the scheduler 2021-05-25 16:04:48 -04:00
Davanum Srinivas
383ce85649 [scheduler] avoid comparing function pointers in unit tests
PluginFactory is a function that returns a plugin. We have been
comparing these functions in unit tests and it has worked so far, but
starts to fail in gotip/master.

Note from the golang team:
```
Func values are incomparable. It is true that you could get the PC
through reflection but it is still not expected to be compared. PCs
can change due to inlining, wrappers, etc., depending on the
compiler's details, which is subject to change.
```

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-05-25 09:34:54 -04:00
sanposhiho
1b6895c11f Fix: remove framework.ScoreExtensions interface check 2021-05-25 13:57:30 +09:00
Kubernetes Prow Robot
4509d6f79f Merge pull request #101460 from edwardstudy/ed/fix-score-weight
Introduce scorePluginWeightMap to replace pluginNameToWeightMap
2021-05-24 21:48:56 -07:00
Kubernetes Prow Robot
5cdf7a714f Merge pull request #100026 from minbaev/enqueue-extions-to-nvl
add enqueue-extensions nodevolumelimits plugin
2021-05-24 21:48:20 -07:00
Alexander Minbaev
3b4be144ab add enqueue-extensions nodevolumelimits plugin 2021-05-24 16:59:31 -05:00
sanposhiho
517feed45b Add: interface check 2021-05-23 23:48:42 +09:00
sanposhiho
be16b7f818 Fix: Logging causes nilpointer 2021-05-23 23:17:29 +09:00
Mike Dame
5a77ebe28b Scheduler: remove pkg/features dependency from NodeResources plugins 2021-05-18 08:59:02 -04:00
edwardstudy
47785131e2 Introduce scorePluginWeightMap to replace pluginNameToWeightMap 2021-05-11 10:23:29 +08:00
yuzhiquan
2b6af46624 fix potential panic for node resource plugin 2021-05-08 18:03:24 +08:00
houjun
447e55132a Delete duplicate judgments 2021-05-07 22:44:41 +08:00
Kubernetes Prow Robot
43e3669482 Merge pull request #101757 from pacoxu/test-fix-registry
compare the func with .Pointer() in scheduler registry-test
2021-05-06 20:59:03 -07:00
Kubernetes Prow Robot
d5691f754f Merge pull request #101703 from july2993/read
use '_' in nodelabel plugin for unused parameters
2021-05-06 05:15:16 -07:00
pacoxu
be0f192acd compare the func with .Pointer() in scheduler registry-test
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-05-06 18:49:04 +08:00
Wei Huang
9c45e8a974 sched: make CycleState's Read()/Write()/Delete() thread-safe
- add internal locking to CycleState's Read()/Write()/Delete() functions
- remove Lock() and Unlock() functions
2021-05-05 12:00:52 -07:00
Yuan Chen
fce28dbac9 Prevent scheduler crashing in default preemption 2021-05-04 19:30:11 -07:00
Jiahao Huang
0980b33b0e use '_' in nodelabel plugin for unused parameters 2021-05-03 18:06:02 +08:00
Konstantin Misyutin
74e30c5e38 Scheduler: remove pkg/features dependency from DefaultPreemption plugin
Signed-off-by: Konstantin Misyutin <konstantin.misyutin@huawei.com>
2021-04-29 23:12:46 +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
Kubernetes Prow Robot
a160d1dedc Merge pull request #101297 from houjun41544/20210421-volumezone
Remove redundant checks
2021-04-21 19:15:56 -07:00
Kubernetes Prow Robot
75b846dee4 Merge pull request #101313 from BinacsLee/binacs-scheduler-fwk-types-cleanup
code cleanup: scheduler / framework use `max` function instead of if-cond…
2021-04-21 17:04:13 -07:00
Kubernetes Prow Robot
5779fec3c4 Merge pull request #99959 from AliceZhang2016/nodeaffinity-cleanup
Move nodeaffinity helpers to component-helpers package
2021-04-21 17:03:53 -07:00
Kubernetes Prow Robot
ba5ec40d41 Merge pull request #101277 from wangyx1992/capatial-log-scheduler
cleanup: fix log capitalization in scheduler
2021-04-21 12:20:03 -07:00
BinacsLee
9ff1419511 code cleanup: scheduler simplify the check function in NodeLabel.Filter 2021-04-21 20:30:02 +08:00
BinacsLee
8f57233a3a code cleanup: scheduler/framework use max function instead of if-condition in types.go 2021-04-21 17:40:35 +08:00
houjun
d3a355d6dc Remove redundant checks 2021-04-21 09:55:45 +08:00
wangyx1992
97c4a4ffa5 cleanup: fix log capitalization in scheduler
Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
2021-04-20 20:20:02 +08:00
BinacsLee
c1fd8390e5 code cleanup: pkg/scheduler modify framework/types.go 2021-04-20 20:07:43 +08:00
Kubernetes Prow Robot
a95fd40203 Merge pull request #100322 from minbaev/cluster-event-reg-cleanup
got rid of ClusterEventReg generate ClusterEvent objects on the fly
2021-04-14 21:27:49 -07:00
Kubernetes Prow Robot
6d130d3b97 Merge pull request #100557 from chendave/validation_cleanup
Validate plugin config for KubeSchedulerConfiguration
2021-04-14 18:20:01 -07:00
Kubernetes Prow Robot
74763cd7e8 Merge pull request #100370 from houjun41544/20210318-nodeinfoIsNil
Remove redundant checks
2021-04-14 18:19:49 -07:00
Kubernetes Prow Robot
d09d1ea6cb Merge pull request #100853 from yuzhiquan/scheduler-events
Implement EnqueueExtensions interface in TopologySpreading scheduling
2021-04-14 13:15:10 -07:00
Kubernetes Prow Robot
e42f44588a Merge pull request #100090 from whypro/enqueue-extension
Implement EnqueueExtensions interface in volumerestrictions and volumezone.
2021-04-14 11:57:09 -07:00
Alexander Minbaev
8325c6b0da got rid of ClusterEventReg with generating ClusterEvent objects on the fly 2021-04-14 13:38:46 -05: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
Dave Chen
62d7f8f570 Fix couple of nits in nodevolumelimits plugin
Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-04-13 15:59:50 +08:00
Kubernetes Prow Robot
1fa101d1a4 Merge pull request #100947 from lojies/cleanuppkgsheduler
code cleanup for pkg/scheduler
2021-04-13 00:44:50 -07:00
Kubernetes Prow Robot
ed3e0d302f Merge pull request #100644 from Huang-Wei/sched-fwk-config
Surface kube config in scheduler framework handle
2021-04-12 19:12:49 -07:00
卢振兴10069964
5ddb1be59a code cleanup for pkg/scheduler 2021-04-13 08:16:16 +08:00
whypro
641627980b Implement EnqueueExtensions interface in volumerestrictions and volumezone. 2021-04-10 00:17:57 +08:00
Kubernetes Prow Robot
4959cd6339 Merge pull request #100671 from Niekvdplas/spelling-mistakes
Fixed several spelling mistakes
2021-04-09 05:19:45 -07:00
Kubernetes Prow Robot
c0778c7e9a Merge pull request #100479 from houjun41544/20210323-InterPodAffinity
Missing return when error
2021-04-08 22:10:05 -07: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