From 94b5a22ddac38a0c15133c479a98671dd933cfde Mon Sep 17 00:00:00 2001 From: galal-hussein Date: Tue, 18 Jun 2019 01:34:27 +0200 Subject: [PATCH] Disable the svclb controller nodeploy for svclb is passed --- pkg/server/server.go | 1 - pkg/servicelb/controller.go | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index 09ddb41176..e2fcd76751 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -134,7 +134,6 @@ func masterControllers(ctx context.Context, sc *Context, config *Config) error { sc.Batch.Batch().V1().Job(), sc.Auth.Rbac().V1().ClusterRoleBinding(), sc.Core.Core().V1().ServiceAccount()) - if err := servicelb.Register(ctx, sc.K8s, sc.Apply, diff --git a/pkg/servicelb/controller.go b/pkg/servicelb/controller.go index 11f9d91c93..3d31fffee3 100644 --- a/pkg/servicelb/controller.go +++ b/pkg/servicelb/controller.go @@ -153,6 +153,10 @@ func (h *handler) onChangeNode(key string, node *core.Node) (*core.Node, error) } func (h *handler) updateService(svc *core.Service) (runtime.Object, error) { + if !h.enabled { + return svc, nil + } + pods, err := h.podCache.List(svc.Namespace, labels.SelectorFromSet(map[string]string{ svcNameLabel: svc.Name, }))