mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 22:20:51 +00:00
Merge pull request #2044 from erictune/fix_mux
Allocate mux in master.New()
This commit is contained in:
@@ -197,7 +197,6 @@ func main() {
|
||||
}
|
||||
|
||||
n := net.IPNet(portalNet)
|
||||
mux := http.NewServeMux()
|
||||
config := &master.Config{
|
||||
Client: client,
|
||||
Cloud: cloud,
|
||||
@@ -215,7 +214,6 @@ func main() {
|
||||
},
|
||||
},
|
||||
PortalNet: &n,
|
||||
Mux: mux,
|
||||
EnableLogsSupport: *enableLogsSupport,
|
||||
EnableUISupport: true,
|
||||
APIPrefix: *apiPrefix,
|
||||
|
@@ -137,14 +137,12 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
||||
if err != nil {
|
||||
glog.Fatalf("Nonnumeric port? %v", err)
|
||||
}
|
||||
mux := http.NewServeMux()
|
||||
// Create a master and install handlers into mux.
|
||||
master.New(&master.Config{
|
||||
m := master.New(&master.Config{
|
||||
Client: cl,
|
||||
EtcdHelper: helper,
|
||||
Minions: machineList,
|
||||
KubeletClient: fakeKubeletClient{},
|
||||
Mux: mux,
|
||||
EnableLogsSupport: false,
|
||||
APIPrefix: "/api",
|
||||
|
||||
@@ -152,7 +150,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
||||
ReadOnlyPort: portNumber,
|
||||
PublicAddress: host,
|
||||
})
|
||||
handler.delegate = mux
|
||||
handler.delegate = m.Handler
|
||||
|
||||
// Scheduler
|
||||
schedulerConfigFactory := &factory.ConfigFactory{cl}
|
||||
|
Reference in New Issue
Block a user