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
aa750998
Commit
aa750998
authored
Jan 06, 2017
by
Kubernetes Submit Queue
Committed by
GitHub
Jan 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39318 from NickrenREN/eviction-manager-start
Automatic merge from submit-queue remove eviction-manager start return err
parents
25e83601
85e6076f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
+3
-6
eviction_manager.go
pkg/kubelet/eviction/eviction_manager.go
+1
-2
types.go
pkg/kubelet/eviction/types.go
+1
-1
kubelet.go
pkg/kubelet/kubelet.go
+1
-3
No files found.
pkg/kubelet/eviction/eviction_manager.go
View file @
aa750998
...
@@ -125,10 +125,9 @@ func (m *managerImpl) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAd
...
@@ -125,10 +125,9 @@ func (m *managerImpl) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAd
}
}
// Start starts the control loop to observe and response to low compute resources.
// Start starts the control loop to observe and response to low compute resources.
func
(
m
*
managerImpl
)
Start
(
diskInfoProvider
DiskInfoProvider
,
podFunc
ActivePodsFunc
,
monitoringInterval
time
.
Duration
)
error
{
func
(
m
*
managerImpl
)
Start
(
diskInfoProvider
DiskInfoProvider
,
podFunc
ActivePodsFunc
,
monitoringInterval
time
.
Duration
)
{
// start the eviction manager monitoring
// start the eviction manager monitoring
go
wait
.
Until
(
func
()
{
m
.
synchronize
(
diskInfoProvider
,
podFunc
)
},
monitoringInterval
,
wait
.
NeverStop
)
go
wait
.
Until
(
func
()
{
m
.
synchronize
(
diskInfoProvider
,
podFunc
)
},
monitoringInterval
,
wait
.
NeverStop
)
return
nil
}
}
// IsUnderMemoryPressure returns true if the node is under memory pressure.
// IsUnderMemoryPressure returns true if the node is under memory pressure.
...
...
pkg/kubelet/eviction/types.go
View file @
aa750998
...
@@ -100,7 +100,7 @@ type Threshold struct {
...
@@ -100,7 +100,7 @@ type Threshold struct {
// Manager evaluates when an eviction threshold for node stability has been met on the node.
// Manager evaluates when an eviction threshold for node stability has been met on the node.
type
Manager
interface
{
type
Manager
interface
{
// Start starts the control loop to monitor eviction thresholds at specified interval.
// Start starts the control loop to monitor eviction thresholds at specified interval.
Start
(
diskInfoProvider
DiskInfoProvider
,
podFunc
ActivePodsFunc
,
monitoringInterval
time
.
Duration
)
error
Start
(
diskInfoProvider
DiskInfoProvider
,
podFunc
ActivePodsFunc
,
monitoringInterval
time
.
Duration
)
// IsUnderMemoryPressure returns true if the node is under memory pressure.
// IsUnderMemoryPressure returns true if the node is under memory pressure.
IsUnderMemoryPressure
()
bool
IsUnderMemoryPressure
()
bool
...
...
pkg/kubelet/kubelet.go
View file @
aa750998
...
@@ -1206,9 +1206,7 @@ func (kl *Kubelet) initializeRuntimeDependentModules() {
...
@@ -1206,9 +1206,7 @@ func (kl *Kubelet) initializeRuntimeDependentModules() {
glog
.
Fatalf
(
"Failed to start cAdvisor %v"
,
err
)
glog
.
Fatalf
(
"Failed to start cAdvisor %v"
,
err
)
}
}
// eviction manager must start after cadvisor because it needs to know if the container runtime has a dedicated imagefs
// eviction manager must start after cadvisor because it needs to know if the container runtime has a dedicated imagefs
if
err
:=
kl
.
evictionManager
.
Start
(
kl
,
kl
.
getActivePods
,
evictionMonitoringPeriod
);
err
!=
nil
{
kl
.
evictionManager
.
Start
(
kl
,
kl
.
getActivePods
,
evictionMonitoringPeriod
)
kl
.
runtimeState
.
setInternalError
(
fmt
.
Errorf
(
"failed to start eviction manager %v"
,
err
))
}
}
}
// Run starts the kubelet reacting to config updates
// Run starts the kubelet reacting to config updates
...
...
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