Skip to content

Commit

Permalink
Run separate informers for api and controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Jul 14, 2017
1 parent c52694b commit 6d86bbb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pkg/cmd/server/start/start_master.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,17 @@ func (m *Master) Start() error {
return fmt.Errorf("KubernetesMasterConfig is required to start this server - use of external Kubernetes is no longer supported.")
}

// informers are shared amongst all the various components we build
informers, err := NewInformers(*m.config)
if err != nil {
return err
}
// we have a strange, optional linkage from controllers to the API server regarding the plug. In the end, this should be structured
// as a separate API server which can be chained as a delegate
var controllerPlug plug.Plug

controllersEnabled := m.controllers && m.config.Controllers != configapi.ControllersDisabled
if controllersEnabled {
// informers are shared amongst all the various controllers we build
informers, err := NewInformers(*m.config)
if err != nil {
return err
}
kubeInternal, _, err := configapi.GetInternalKubeClient(m.config.MasterClients.OpenShiftLoopbackKubeConfig, m.config.MasterClients.OpenShiftLoopbackClientConnectionOverrides)
if err != nil {
return err
Expand Down Expand Up @@ -497,6 +497,11 @@ func (m *Master) Start() error {
}

if m.api {
// informers are shared amongst all the various api components we build
informers, err := NewInformers(*m.config)
if err != nil {
return err
}
openshiftConfig, err := origin.BuildMasterConfig(*m.config, informers)
if err != nil {
return err
Expand Down

0 comments on commit 6d86bbb

Please sign in to comment.