mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Merge pull request #38636 from dhawal55/internal-elb
Automatic merge from submit-queue (batch tested with PRs 43067, 45586, 45590, 38636, 45599) AWS: Remove check that forces loadBalancerSourceRanges to be 0.0.0.0/0. fixes #38633 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
This commit is contained in:
commit
b0399114fe
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user