[REV] fix remove datacentorConfig error

This commit is contained in:
bay1ts 2017-11-27 14:31:41 +08:00
parent 87398e474b
commit 8f1723ad30

View File

@ -41,6 +41,7 @@ type MasterServer struct {
//NewMasterServer 创建master节点 //NewMasterServer 创建master节点
func NewMasterServer(node *model.HostNode, k8sClient *kubernetes.Clientset) (*MasterServer, error) { func NewMasterServer(node *model.HostNode, k8sClient *kubernetes.Clientset) (*MasterServer, error) {
datacenterConfig := config.CreateDataCenterConfig()
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
cluster, err := CreateNodeCluster(k8sClient,node) cluster, err := CreateNodeCluster(k8sClient,node)
if err != nil { if err != nil {
@ -54,6 +55,7 @@ func NewMasterServer(node *model.HostNode, k8sClient *kubernetes.Clientset) (*Ma
Cluster: cluster, Cluster: cluster,
ctx: ctx, ctx: ctx,
cancel: cancel, cancel: cancel,
datacenterConfig: datacenterConfig,
} }
return ms, nil return ms, nil
} }