mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-11 01:41:54 -04:00
Pick a sane default for ETCD_PREFIX
This commit is contained in:
parent
bff6ee8e4a
commit
9d45f5b929
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue