Skip to content

Commit

Permalink
Disable cAdvisor event storage by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tallclair committed Apr 26, 2016
1 parent 62c7373 commit 2201554
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions pkg/kubelet/cadvisor/cadvisor_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,21 @@ const defaultHousekeepingInterval = 10 * time.Second
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)
// Override cAdvisor flag defaults.
flagOverrides := map[string]string{
// Override the default cAdvisor housekeeping interval.
"housekeeping_interval": defaultHousekeepingInterval.String(),
// Disable event storage by default.
"event_storage_event_limit": "default=0",
"event_storage_age_limit": "default=0",
}
for name, defaultValue := range flagOverrides {
if f := flag.Lookup(name); f != nil {
f.DefValue = defaultValue
f.Value.Set(defaultValue)
} else {
glog.Errorf("Expected cAdvisor flag %q not found", name)
}
}
}

Expand Down

1 comment on commit 2201554

@k8s-teamcity-mesosphere

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 22602 outcome was FAILURE
Summary: Exit code 1 (new) Build time: 00:06:28

Please sign in to comment.