diff --git a/pkg/kubelet/cadvisor/cadvisor_linux.go b/pkg/kubelet/cadvisor/cadvisor_linux.go index 5f253e92b71..1c1535fed8f 100644 --- a/pkg/kubelet/cadvisor/cadvisor_linux.go +++ b/pkg/kubelet/cadvisor/cadvisor_linux.go @@ -44,6 +44,8 @@ var _ Interface = new(cadvisorClient) // TODO(vmarmol): Make configurable. // The amount of time for which to keep stats in memory. const statsCacheDuration = 2 * time.Minute +const maxHousekeepingInterval = 15 * time.Second +const allowDynamicHousekeeping = true // Creates a cAdvisor and exports its API on the specified port if port > 0. func New(port uint) (Interface, error) { @@ -53,7 +55,7 @@ func New(port uint) (Interface, error) { } // Create and start the cAdvisor container manager. - m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs) + m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs, maxHousekeepingInterval, allowDynamicHousekeeping) if err != nil { return nil, err }