mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 13:14:05 +00:00
Add master.Config type and cleanup master configuration
Setting up a new master.Master instance requires passing around too many arguments. Add a master.Config type and group related master configs. Refactor all commands to instantiate new masters using a master.Config struct.
This commit is contained in:
@@ -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