diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 85af7bacba1..1667ff015a4 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -69,8 +69,6 @@ const TagNameSubnetPublicELB = "kubernetes.io/role/elb" // ServiceAnnotationLoadBalancerInternal is the annotation used on the service // to indicate that we want an internal ELB. -// Currently we accept only the value "0.0.0.0/0" - other values are an error. -// This lets us define more advanced semantics in future. const ServiceAnnotationLoadBalancerInternal = "service.beta.kubernetes.io/aws-load-balancer-internal" // ServiceAnnotationLoadBalancerProxyProtocol is the annotation used on the @@ -2589,13 +2587,6 @@ func (c *Cloud) EnsureLoadBalancer(clusterName string, apiService *v1.Service, n internalELB := false internalAnnotation := apiService.Annotations[ServiceAnnotationLoadBalancerInternal] if internalAnnotation != "" { - if internalAnnotation != "0.0.0.0/0" { - return nil, 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 - return nil, fmt.Errorf("source-range annotation cannot be combined with the internal-elb annotation") - } internalELB = true }