Extract the service controller from the apiserver, put it in the controller manager for now.

This commit is contained in:
Brendan Burns
2014-10-03 15:27:22 -07:00
parent 90800bdc43
commit e6991d0a66
5 changed files with 18 additions and 35 deletions

View File

@@ -40,6 +40,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/dockertools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/master"
"github.com/GoogleCloudPlatform/kubernetes/pkg/service"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/wait"
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler"
@@ -133,6 +134,9 @@ func startComponents(manifestURL string) (apiServerURL string) {
// Scheduler
scheduler.New((&factory.ConfigFactory{cl}).Create()).Run()
endpoints := service.NewEndpointController(cl)
go util.Forever(func() { endpoints.SyncServiceEndpoints() }, time.Second*10)
controllerManager := controller.NewReplicationManager(cl)
// Prove that controllerManager's watch works by making it not sync until after this