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, }))