Merge pull request #13879 from krousey/etcd_prefix_default

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-09-15 16:19:31 -07:00
commit 02c0e091d2

View File

@ -23,7 +23,11 @@ import (
// Returns the prefix set via the ETCD_PREFIX environment variable (if any).
func PathPrefix() string {
return path.Join("/", os.Getenv("ETCD_PREFIX"))
pref := os.Getenv("ETCD_PREFIX")
if pref == "" {
pref = "registry"
}
return path.Join("/", pref)
}
// Adds the ETCD_PREFIX to the provided key