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
bf315d45
Commit
bf315d45
authored
Jan 14, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19374 from timstclair/housekeep
Auto commit by PR queue bot
parents
d9fdc967
1fd72a78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
cadvisor_linux.go
pkg/kubelet/cadvisor/cadvisor_linux.go
+10
-0
No files found.
pkg/kubelet/cadvisor/cadvisor_linux.go
View file @
bf315d45
...
@@ -19,6 +19,7 @@ limitations under the License.
...
@@ -19,6 +19,7 @@ limitations under the License.
package
cadvisor
package
cadvisor
import
(
import
(
"flag"
"fmt"
"fmt"
"net/http"
"net/http"
"regexp"
"regexp"
...
@@ -46,8 +47,17 @@ var _ Interface = new(cadvisorClient)
...
@@ -46,8 +47,17 @@ var _ Interface = new(cadvisorClient)
// The amount of time for which to keep stats in memory.
// The amount of time for which to keep stats in memory.
const
statsCacheDuration
=
2
*
time
.
Minute
const
statsCacheDuration
=
2
*
time
.
Minute
const
maxHousekeepingInterval
=
15
*
time
.
Second
const
maxHousekeepingInterval
=
15
*
time
.
Second
const
defaultHousekeepingInterval
=
10
*
time
.
Second
const
allowDynamicHousekeeping
=
true
const
allowDynamicHousekeeping
=
true
func
init
()
{
// Override the default cAdvisor housekeeping interval.
if
f
:=
flag
.
Lookup
(
"housekeeping_interval"
);
f
!=
nil
{
f
.
DefValue
=
defaultHousekeepingInterval
.
String
()
f
.
Value
.
Set
(
f
.
DefValue
)
}
}
// Creates a cAdvisor and exports its API on the specified port if port > 0.
// Creates a cAdvisor and exports its API on the specified port if port > 0.
func
New
(
port
uint
)
(
Interface
,
error
)
{
func
New
(
port
uint
)
(
Interface
,
error
)
{
sysFs
,
err
:=
sysfs
.
NewRealSysFs
()
sysFs
,
err
:=
sysfs
.
NewRealSysFs
()
...
...
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