Merge pull request #1578 from brendandburns/controller

Extract the service controller from the apiserver.
This commit is contained in:
Daniel Smith
2014-10-06 12:44:41 -07:00
5 changed files with 18 additions and 35 deletions

View File

@@ -41,6 +41,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"
@@ -136,6 +137,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