Commit Graph

29 Commits

Author SHA1 Message Date
Todd Neal
4096c9209c dedupe pod resource request calculation 2023-03-09 17:15:53 -06:00
tangwz
a4ab559ba4 Improve performance of NodeResourcesFit scoring
Signed-off-by: tangwz <tangwz.com@gmail.com>
2022-12-21 23:23:47 +08:00
Kubernetes Prow Robot
c80b03fee8
Merge pull request #113499 from kerthcet/cleanup/map-empty-judgement
Fix: resourceToWeightMap will never be nil here
2022-12-12 00:15:33 -08:00
Aldo Culquicondor
b62541fe84
Avoid serialization of maps when log level < 10
Change-Id: If264c26ae599602d5b4919301f011c2095d706ee
2022-11-30 12:53:52 -05:00
kerthcet
7b7da83a8a Fix: resourceToWeightMap will never be nil
Use len() instead of telling whether it's nil
Add tests to guarantee that when resourceToWeightMap is nil, scheduler will not crash

Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-11-10 14:07:02 +08:00
Sergey Kanzhelev
ad7199a9da remove podOverhead feature gate as a feature is now GA since 1.24 2022-09-19 19:25:16 +00: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
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
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
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
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
Mike Dame
5a77ebe28b Scheduler: remove pkg/features dependency from NodeResources plugins 2021-05-18 08:59:02 -04: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
Jan Chaloupka
6822a0ec20 Move pkg/apis/core/v1.IsScalarResourceName under pkg/scheduler/util
IsScalarResourceName is imported only inside pkg/scheduler packages.
2020-10-27 13:40:32 +01:00
Ali
09b2e8f638 Move scheduler interface to pkg/scheduler/framework 2020-10-13 13:13:27 +11:00
Draven
79f05c65a0 fix: use ">" instead of ">=" in resource allocation 2020-09-30 11:06:17 +08: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
fengzixu
d54822d193 bugfix: initcontainer wasn't considered when calculate resource request 2020-04-23 02:08:33 +09:00
Abdullah Gharaibeh
2c51c13620 Scheduler NodeInfo cleanup 2020-04-09 19:03:51 -04:00
Abdullah Gharaibeh
a5d8172715 move nodeinfo type to framework pkg 2020-04-07 10:25:24 -04:00
Abdullah Gharaibeh
ed3fe054df move scheduler nodeinfo to pkg/scheduler/types 2020-03-31 21:02:09 -04:00
Wei Huang
b2159b5d66
Remove scheduler/algorithm/priorities/util package 2020-01-09 20:16:05 -08:00
Abdullah Gharaibeh
b9e2389e0d Move RequestedToCapacityRatio argument processing to its plugin 2020-01-06 11:54:09 -05:00
notpad
7f79516705 Move resource-based priority functions to their Score plugins 2019-12-31 23:50:11 +08:00