From b5e1e044bc1da7c2cbdf41c0a2b5a49e594b9967 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Thu, 14 Aug 2014 15:46:08 -0400 Subject: [PATCH] Move EndpointsController to its own package Avoids recursive loop with endpoint registry defined --- pkg/master/master.go | 4 ++-- .../endpoint/endpoints.go => service/endpoints_controller.go} | 2 +- .../endpoints_controller_test.go} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename pkg/{registry/endpoint/endpoints.go => service/endpoints_controller.go} (99%) rename pkg/{registry/endpoint/endpoints_test.go => service/endpoints_controller_test.go} (99%) diff --git a/pkg/master/master.go b/pkg/master/master.go index 626291c6185..035dd4f2017 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -26,11 +26,11 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/binding" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/controller" - "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/endpoint" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/etcd" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/minion" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/pod" "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/service" + servicecontroller "github.com/GoogleCloudPlatform/kubernetes/pkg/service" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" goetcd "github.com/coreos/go-etcd/etcd" @@ -106,7 +106,7 @@ func (m *Master) init(cloud cloudprovider.Interface, podInfoGetter client.PodInf podCache := NewPodCache(podInfoGetter, m.podRegistry) go util.Forever(func() { podCache.UpdateAllContainers() }, time.Second*30) - endpoints := endpoint.NewEndpointController(m.serviceRegistry, m.client) + endpoints := servicecontroller.NewEndpointController(m.serviceRegistry, m.client) go util.Forever(func() { endpoints.SyncServiceEndpoints() }, time.Second*10) m.storage = map[string]apiserver.RESTStorage{ diff --git a/pkg/registry/endpoint/endpoints.go b/pkg/service/endpoints_controller.go similarity index 99% rename from pkg/registry/endpoint/endpoints.go rename to pkg/service/endpoints_controller.go index 1eaa5e32c37..5c0924555b0 100644 --- a/pkg/registry/endpoint/endpoints.go +++ b/pkg/service/endpoints_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package endpoint +package service import ( "fmt" diff --git a/pkg/registry/endpoint/endpoints_test.go b/pkg/service/endpoints_controller_test.go similarity index 99% rename from pkg/registry/endpoint/endpoints_test.go rename to pkg/service/endpoints_controller_test.go index 58ba3913323..06f46b70573 100644 --- a/pkg/registry/endpoint/endpoints_test.go +++ b/pkg/service/endpoints_controller_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package endpoint +package service import ( "encoding/json"