Move validation of load balancers only supporting TCP ports to validation.go.

This commit is contained in:
Alex Robinson
2015-04-03 19:06:25 +00:00
parent 2b14fc1d14
commit 9a351e3670
4 changed files with 39 additions and 23 deletions

View File

@@ -385,7 +385,6 @@ func (s *ServiceController) loadBalancerName(service *api.Service) string {
return s.cloud.GetLoadBalancerName(s.clusterName, service.Namespace, service.Name)
}
// TODO: Deduplicate this with the copy in pkg/registry/service/rest.go.
func getTCPPorts(service *api.Service) ([]int, error) {
ports := []int{}
for i := range service.Spec.Ports {