Reduce the etcd surface area in the integration test to minimize the client dependency.

This commit is contained in:
Timothy St. Clair
2016-11-18 16:10:09 -06:00
parent 4a3c7aecdb
commit d15e20eed4
10 changed files with 23 additions and 324 deletions

View File

@@ -60,6 +60,7 @@ import (
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/storage/storagebackend"
"k8s.io/kubernetes/pkg/util/env"
"k8s.io/kubernetes/pkg/util/wait"
"k8s.io/kubernetes/pkg/version"
"k8s.io/kubernetes/pkg/watch"
@@ -295,6 +296,13 @@ func parseCIDROrDie(cidr string) *net.IPNet {
return parsed
}
// return the EtcdURL
func GetEtcdURLFromEnv() string {
url := env.GetEnvAsStringOrFallback("KUBE_INTEGRATION_ETCD_URL", "http://127.0.0.1:2379")
glog.V(4).Infof("Using KUBE_INTEGRATION_ETCD_URL=%q", url)
return url
}
// Returns a basic master config.
func NewMasterConfig() *master.Config {
config := storagebackend.Config{