From 87da0e69d5270b95f1c051e7f8d4cc74554c9776 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 18 Jan 2017 00:14:24 -0500 Subject: [PATCH] servicecontroller: remove unused zone field The zone field was unused, and this complicated e.g. #39996 --- pkg/controller/service/servicecontroller.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkg/controller/service/servicecontroller.go b/pkg/controller/service/servicecontroller.go index 6a9066b257c..346001c73f7 100644 --- a/pkg/controller/service/servicecontroller.go +++ b/pkg/controller/service/servicecontroller.go @@ -84,7 +84,6 @@ type ServiceController struct { kubeClient clientset.Interface clusterName string balancer cloudprovider.LoadBalancer - zone cloudprovider.Zone cache *serviceCache serviceLister corelisters.ServiceLister serviceListerSynced cache.InformerSynced @@ -218,15 +217,6 @@ func (s *ServiceController) init() error { } s.balancer = balancer - zones, ok := s.cloud.Zones() - if !ok { - return fmt.Errorf("the cloud provider does not support zone enumeration, which is required for creating load balancers.") - } - zone, err := zones.GetZone() - if err != nil { - return fmt.Errorf("failed to get zone from cloud provider, will not be able to create load balancers: %v", err) - } - s.zone = zone return nil }