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
feb4b485
Commit
feb4b485
authored
Feb 01, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19890 from vishh/0-nodes
Auto commit by PR queue bot
parents
7e158006
21748701
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
kubelet.go
pkg/kubelet/kubelet.go
+1
-3
predicates.go
plugin/pkg/scheduler/algorithm/predicates/predicates.go
+2
-2
No files found.
pkg/kubelet/kubelet.go
View file @
feb4b485
...
...
@@ -2137,9 +2137,7 @@ func hasHostPortConflicts(pods []*api.Pod) bool {
return
false
}
// hasInsufficientfFreeResources detects pods that exceeds node's resources.
// TODO: Consider integrate disk space into this function, and returns a
// suitable reason and message per resource type.
// hasInsufficientfFreeResources detects pods that exceeds node's cpu and memory resource.
func
(
kl
*
Kubelet
)
hasInsufficientfFreeResources
(
pods
[]
*
api
.
Pod
)
(
bool
,
bool
)
{
info
,
err
:=
kl
.
GetCachedMachineInfo
()
if
err
!=
nil
{
...
...
plugin/pkg/scheduler/algorithm/predicates/predicates.go
View file @
feb4b485
...
...
@@ -273,8 +273,8 @@ func CheckPodsExceedingFreeResources(pods []*api.Pod, allocatable api.ResourceLi
memoryRequested
:=
int64
(
0
)
for
_
,
pod
:=
range
pods
{
podRequest
:=
getResourceRequest
(
pod
)
fitsCPU
:=
totalMilliCPU
==
0
||
(
totalMilliCPU
-
milliCPURequested
)
>=
podRequest
.
milliCPU
fitsMemory
:=
totalMemory
==
0
||
(
totalMemory
-
memoryRequested
)
>=
podRequest
.
memory
fitsCPU
:=
(
totalMilliCPU
-
milliCPURequested
)
>=
podRequest
.
milliCPU
fitsMemory
:=
(
totalMemory
-
memoryRequested
)
>=
podRequest
.
memory
if
!
fitsCPU
{
// the pod doesn't fit due to CPU request
notFittingCPU
=
append
(
notFittingCPU
,
pod
)
...
...
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