Make data dirs for all pods when syncing

This commit is contained in:
Tim Hockin
2015-01-11 16:42:11 -08:00
parent c93fb4e309
commit ca89aa6528
4 changed files with 84 additions and 21 deletions

View File

@@ -18,8 +18,6 @@ package kubelet
import (
"net/http"
"os"
"path"
"strconv"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
@@ -70,17 +68,6 @@ func EtcdClientOrDie(etcdServerList util.StringList, etcdConfigFile string) *etc
return nil
}
// TODO: move this into pkg/util
func SetupRootDirectoryOrDie(rootDirectory string) {
if rootDirectory == "" {
glog.Fatal("Invalid root directory path.")
}
rootDirectory = path.Clean(rootDirectory)
if err := os.MkdirAll(rootDirectory, 0750); err != nil {
glog.Fatalf("Error creating root directory: %v", err)
}
}
// TODO: move this into pkg/capabilities
func SetupCapabilities(allowPrivileged bool) {
capabilities.Initialize(capabilities.Capabilities{