Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d30704af
Commit
d30704af
authored
Jul 23, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11682 from nak3/priorities-fix
Remove unused argument from fractionOfCapacity()
parents
1a49ba1b
5d3958ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
priorities.go
plugin/pkg/scheduler/algorithm/priorities/priorities.go
+3
-3
No files found.
plugin/pkg/scheduler/algorithm/priorities/priorities.go
View file @
d30704af
...
@@ -212,8 +212,8 @@ func calculateBalancedResourceAllocation(pod *api.Pod, node api.Node, pods []*ap
...
@@ -212,8 +212,8 @@ func calculateBalancedResourceAllocation(pod *api.Pod, node api.Node, pods []*ap
capacityMilliCPU
:=
node
.
Status
.
Capacity
.
Cpu
()
.
MilliValue
()
capacityMilliCPU
:=
node
.
Status
.
Capacity
.
Cpu
()
.
MilliValue
()
capacityMemory
:=
node
.
Status
.
Capacity
.
Memory
()
.
Value
()
capacityMemory
:=
node
.
Status
.
Capacity
.
Memory
()
.
Value
()
cpuFraction
:=
fractionOfCapacity
(
totalMilliCPU
,
capacityMilliCPU
,
node
.
Name
)
cpuFraction
:=
fractionOfCapacity
(
totalMilliCPU
,
capacityMilliCPU
)
memoryFraction
:=
fractionOfCapacity
(
totalMemory
,
capacityMemory
,
node
.
Name
)
memoryFraction
:=
fractionOfCapacity
(
totalMemory
,
capacityMemory
)
if
cpuFraction
>=
1
||
memoryFraction
>=
1
{
if
cpuFraction
>=
1
||
memoryFraction
>=
1
{
// if requested >= capacity, the corresponding host should never be preferrred.
// if requested >= capacity, the corresponding host should never be preferrred.
score
=
0
score
=
0
...
@@ -239,7 +239,7 @@ func calculateBalancedResourceAllocation(pod *api.Pod, node api.Node, pods []*ap
...
@@ -239,7 +239,7 @@ func calculateBalancedResourceAllocation(pod *api.Pod, node api.Node, pods []*ap
}
}
}
}
func
fractionOfCapacity
(
requested
,
capacity
int64
,
node
string
)
float64
{
func
fractionOfCapacity
(
requested
,
capacity
int64
)
float64
{
if
capacity
==
0
{
if
capacity
==
0
{
return
1
return
1
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment