From e4bebc7c4039bf906b944b98fa3921f1905ddcb6 Mon Sep 17 00:00:00 2001 From: Dhawal Patel Date: Mon, 12 Dec 2016 10:53:49 -0800 Subject: [PATCH 1/2] Remove check that forces loadBalancerSourceRanges to be 0.0.0.0/0. Also, remove check that forces service.beta.kubernetes.io/aws-load-balancer-internal annotation to be 0.0.0.0/0. Ideally, it should be a boolean, but for backward compatibility, leaving it to be a non-empty value --- pkg/cloudprovider/providers/aws/aws.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index be4d63f9418..e518d78b2c9 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -2315,13 +2315,6 @@ func (c *Cloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) (*ap 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 } From 0e57b912a60afbe5911bde31b5e5e1608e6fac78 Mon Sep 17 00:00:00 2001 From: Dhawal Patel Date: Tue, 9 May 2017 13:41:15 -0700 Subject: [PATCH 2/2] Update comment on ServiceAnnotationLoadBalancerInternal --- pkg/cloudprovider/providers/aws/aws.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index e518d78b2c9..0bfb957b5cc 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -72,8 +72,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