Add support for garbage collecting images.

This commit is contained in:
Brendan Burns
2014-12-22 11:54:07 -08:00
parent 95d4da98bb
commit b8781c04bb
6 changed files with 108 additions and 19 deletions

View File

@@ -24,7 +24,6 @@ import (
"path"
"strconv"
"strings"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
@@ -77,18 +76,6 @@ func ConnectToDockerOrDie(dockerEndpoint string) *docker.Client {
return client
}
// TODO: move this into the kubelet itself
func GarbageCollectLoop(k *Kubelet) {
func() {
util.Forever(func() {
err := k.GarbageCollectContainers()
if err != nil {
glog.Errorf("Garbage collect failed: %v", err)
}
}, time.Minute*1)
}()
}
// TODO: move this into the kubelet itself
func MonitorCAdvisor(k *Kubelet, cp uint) {
defer util.HandleCrash()