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
85e6076f
Commit
85e6076f
authored
Dec 30, 2016
by
NickrenREN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove eviction-manager start return err
Start() function will never return err,we do not need the return value
parent
84df0679
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 @
85e6076f
...
...
@@ -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.
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
go
wait
.
Until
(
func
()
{
m
.
synchronize
(
diskInfoProvider
,
podFunc
)
},
monitoringInterval
,
wait
.
NeverStop
)
return
nil
}
// IsUnderMemoryPressure returns true if the node is under memory pressure.
...
...
pkg/kubelet/eviction/types.go
View file @
85e6076f
...
...
@@ -100,7 +100,7 @@ type Threshold struct {
// Manager evaluates when an eviction threshold for node stability has been met on the node.
type
Manager
interface
{
// 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
()
bool
...
...
pkg/kubelet/kubelet.go
View file @
85e6076f
...
...
@@ -1206,9 +1206,7 @@ func (kl *Kubelet) initializeRuntimeDependentModules() {
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
if
err
:=
kl
.
evictionManager
.
Start
(
kl
,
kl
.
getActivePods
,
evictionMonitoringPeriod
);
err
!=
nil
{
kl
.
runtimeState
.
setInternalError
(
fmt
.
Errorf
(
"failed to start eviction manager %v"
,
err
))
}
kl
.
evictionManager
.
Start
(
kl
,
kl
.
getActivePods
,
evictionMonitoringPeriod
)
}
// 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