Commit 94b5a22d authored by galal-hussein's avatar galal-hussein

Disable the svclb controller nodeploy for svclb is passed

parent 4ea110f7
...@@ -134,7 +134,6 @@ func masterControllers(ctx context.Context, sc *Context, config *Config) error { ...@@ -134,7 +134,6 @@ func masterControllers(ctx context.Context, sc *Context, config *Config) error {
sc.Batch.Batch().V1().Job(), sc.Batch.Batch().V1().Job(),
sc.Auth.Rbac().V1().ClusterRoleBinding(), sc.Auth.Rbac().V1().ClusterRoleBinding(),
sc.Core.Core().V1().ServiceAccount()) sc.Core.Core().V1().ServiceAccount())
if err := servicelb.Register(ctx, if err := servicelb.Register(ctx,
sc.K8s, sc.K8s,
sc.Apply, sc.Apply,
......
...@@ -153,6 +153,10 @@ func (h *handler) onChangeNode(key string, node *core.Node) (*core.Node, error) ...@@ -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) { 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{ pods, err := h.podCache.List(svc.Namespace, labels.SelectorFromSet(map[string]string{
svcNameLabel: svc.Name, svcNameLabel: svc.Name,
})) }))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment