File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
deployer/commands/generate/resource_allocation Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,11 @@ def proportional_memory_strategy(
5151 # In addition, we provide some wiggle room to account for additional daemonset requests or other
5252 # issues that may pop up due to changes outside our control (like k8s upgrades). This is either
5353 # 2% of the available capacity, or 2GB / 1 CPU (whichever is smaller)
54+ WIGGLE_PERCENTAGE = 0.02
5455 mem_overhead_wiggle = min (
55- nodeinfo ["available" ]["memory" ] * 0.02 , 2 * 1024 * 1024 * 1024
56+ nodeinfo ["available" ]["memory" ] * WIGGLE_PERCENTAGE , 2 * 1024 * 1024 * 1024
5657 )
57- cpu_overhead_wiggle = min (nodeinfo ["available" ]["cpu" ] * 0.02 , 1 )
58+ cpu_overhead_wiggle = min (nodeinfo ["available" ]["cpu" ] * WIGGLE_PERCENTAGE , 1 )
5859
5960 available_node_mem = nodeinfo ["available" ]["memory" ] - mem_overhead_wiggle
6061 available_node_cpu = nodeinfo ["available" ]["cpu" ] - cpu_overhead_wiggle
You can’t perform that action at this time.
0 commit comments