diff --git a/core/pkg/ingress/controller/controller.go b/core/pkg/ingress/controller/controller.go index 036e38d50..a2ca86bd1 100644 --- a/core/pkg/ingress/controller/controller.go +++ b/core/pkg/ingress/controller/controller.go @@ -111,7 +111,7 @@ type GenericController struct { // Configuration contains all the settings required by an Ingress controller type Configuration struct { - Client *clientset.Clientset + Client clientset.Interface ResyncPeriod time.Duration DefaultService string diff --git a/core/pkg/ingress/controller/named_port.go b/core/pkg/ingress/controller/named_port.go index abc1e6ef2..da28df135 100644 --- a/core/pkg/ingress/controller/named_port.go +++ b/core/pkg/ingress/controller/named_port.go @@ -38,7 +38,7 @@ import ( func (ic *GenericController) checkSvcForUpdate(svc *api.Service) error { // get the pods associated with the service // TODO: switch this to a watch - pods, err := ic.cfg.Client.Pods(svc.Namespace).List(api.ListOptions{ + pods, err := ic.cfg.Client.Core().Pods(svc.Namespace).List(api.ListOptions{ LabelSelector: labels.Set(svc.Spec.Selector).AsSelector(), }) @@ -82,7 +82,7 @@ func (ic *GenericController) checkSvcForUpdate(svc *api.Service) error { if len(namedPorts) > 0 && !reflect.DeepEqual(curNamedPort, namedPorts) { data, _ := json.Marshal(namedPorts) - newSvc, err := ic.cfg.Client.Services(svc.Namespace).Get(svc.Name) + newSvc, err := ic.cfg.Client.Core().Services(svc.Namespace).Get(svc.Name) if err != nil { return fmt.Errorf("error getting service %v/%v: %v", svc.Namespace, svc.Name, err) } @@ -93,7 +93,7 @@ func (ic *GenericController) checkSvcForUpdate(svc *api.Service) error { newSvc.ObjectMeta.Annotations[service.NamedPortAnnotation] = string(data) glog.Infof("updating service %v with new named port mappings", svc.Name) - _, err = ic.cfg.Client.Services(svc.Namespace).Update(newSvc) + _, err = ic.cfg.Client.Core().Services(svc.Namespace).Update(newSvc) if err != nil { return fmt.Errorf("error syncing service %v/%v: %v", svc.Namespace, svc.Name, err) }