Merge pull request #642 from kelseyhightower/cleanup_master_configs
Add master.Config type and cleanup master configuration
This commit is contained in:
@@ -83,9 +83,23 @@ func main() {
|
||||
|
||||
var m *master.Master
|
||||
if len(etcdServerList) > 0 {
|
||||
m = master.New(etcdServerList, machineList, podInfoGetter, cloud, *minionRegexp, client, *healthCheckMinions, *minionCacheTTL)
|
||||
m = master.New(&master.Config{
|
||||
Client: client,
|
||||
Cloud: cloud,
|
||||
EtcdServers: etcdServerList,
|
||||
HealthCheckMinions: *healthCheckMinions,
|
||||
Minions: machineList,
|
||||
MinionCacheTTL: *minionCacheTTL,
|
||||
MinionRegexp: *minionRegexp,
|
||||
PodInfoGetter: podInfoGetter,
|
||||
})
|
||||
} else {
|
||||
m = master.NewMemoryServer(machineList, podInfoGetter, cloud, client)
|
||||
m = master.NewMemoryServer(&master.Config{
|
||||
Client: client,
|
||||
Cloud: cloud,
|
||||
Minions: machineList,
|
||||
PodInfoGetter: podInfoGetter,
|
||||
})
|
||||
}
|
||||
|
||||
glog.Fatal(m.Run(net.JoinHostPort(*address, strconv.Itoa(int(*port))), *apiPrefix))
|
||||
|
@@ -95,7 +95,12 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
||||
cl.Sync = true
|
||||
|
||||
// Master
|
||||
m := master.New(servers, machineList, fakePodInfoGetter{}, nil, "", cl, false, 0)
|
||||
m := master.New(&master.Config{
|
||||
Client: cl,
|
||||
EtcdServers: servers,
|
||||
Minions: machineList,
|
||||
PodInfoGetter: fakePodInfoGetter{},
|
||||
})
|
||||
handler.delegate = m.ConstructHandler("/api/v1beta1")
|
||||
|
||||
controllerManager := controller.MakeReplicationManager(etcdClient, cl)
|
||||
|
Reference in New Issue
Block a user