From e3a8fd116d144a97485f9e1f561f70f4be79f81b Mon Sep 17 00:00:00 2001 From: Ed Robinson Date: Sun, 31 Jul 2016 19:39:46 +0100 Subject: [PATCH] Don't filter the endpoint and service watches We added the ability to filter the ingresses used by traefik based on a label selector, but we shouldn't need to have matching labels on every other resource, Ingress allready has a way to explicty choose which pods end up in the load ballancer (by refering to the membership of a particular service) --- provider/k8s/client.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/provider/k8s/client.go b/provider/k8s/client.go index b120c8bb4..d7ac398e6 100644 --- a/provider/k8s/client.go +++ b/provider/k8s/client.go @@ -111,9 +111,9 @@ func (c *clientImpl) GetService(name, namespace string) (Service, error) { } // WatchServices returns all services in the cluster -func (c *clientImpl) WatchServices(labelSelector string, stopCh <-chan bool) (chan interface{}, chan error, error) { +func (c *clientImpl) WatchServices(stopCh <-chan bool) (chan interface{}, chan error, error) { getURL := c.endpointURL + APIEndpoint + "/services" - return c.watch(getURL, labelSelector, stopCh) + return c.watch(getURL, "", stopCh) } // GetEndpoints returns the named Endpoints @@ -134,9 +134,9 @@ func (c *clientImpl) GetEndpoints(name, namespace string) (Endpoints, error) { } // WatchEndpoints returns endpoints in the cluster -func (c *clientImpl) WatchEndpoints(labelSelector string, stopCh <-chan bool) (chan interface{}, chan error, error) { +func (c *clientImpl) WatchEndpoints(stopCh <-chan bool) (chan interface{}, chan error, error) { getURL := c.endpointURL + APIEndpoint + "/endpoints" - return c.watch(getURL, labelSelector, stopCh) + return c.watch(getURL, "", stopCh) } // WatchAll returns events in the cluster @@ -150,12 +150,12 @@ func (c *clientImpl) WatchAll(labelSelector string, stopCh <-chan bool) (chan in return watchCh, errCh, fmt.Errorf("failed to create watch: %v", err) } stopServices := make(chan bool) - chanServices, chanServicesErr, err := c.WatchServices(labelSelector, stopServices) + chanServices, chanServicesErr, err := c.WatchServices(stopServices) if err != nil { return watchCh, errCh, fmt.Errorf("failed to create watch: %v", err) } stopEndpoints := make(chan bool) - chanEndpoints, chanEndpointsErr, err := c.WatchEndpoints(labelSelector, stopEndpoints) + chanEndpoints, chanEndpointsErr, err := c.WatchEndpoints(stopEndpoints) if err != nil { return watchCh, errCh, fmt.Errorf("failed to create watch: %v", err) }