returnnil,fmt.Errorf("annotation %q=%q detected, but the only value supported currently is 0.0.0.0/0",ServiceAnnotationLoadBalancerInternal,internalAnnotation)
}
if!service.IsAllowAll(sourceRanges){
// TODO: Unify the two annotations
returnnil,fmt.Errorf("source-range annotation cannot be combined with the internal-elb annotation")
}
internalELB=true
}
// Find the subnets that the ELB will live in
subnetIDs,err:=s.findELBSubnets(internalELB)
iferr!=nil{
iferr!=nil{
glog.Error("Error listing subnets in VPC: ",err)
glog.Error("Error listing subnets in VPC: ",err)
returnnil,err
returnnil,err
}
}
// Bail out early if there are no subnets
iflen(subnetIDs)==0{
returnnil,fmt.Errorf("could not find any suitable subnets for creating the ELB")
}
// Create a security group for the load balancer
// Create a security group for the load balancer
varsecurityGroupIDstring
varsecurityGroupIDstring
{
{
...
@@ -2115,7 +2211,7 @@ func (s *AWSCloud) EnsureLoadBalancer(name, region string, publicIP net.IP, port
...
@@ -2115,7 +2211,7 @@ func (s *AWSCloud) EnsureLoadBalancer(name, region string, publicIP net.IP, port