mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
servicecontroller: remove unused zone field
The zone field was unused, and this complicated e.g. #39996
This commit is contained in:
parent
8911e2a377
commit
87da0e69d5
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user