mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
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:
parent
9ada26d6cd
commit
e4bebc7c40
@ -2315,13 +2315,6 @@ func (c *Cloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) (*ap
|
|||||||
internalELB := false
|
internalELB := false
|
||||||
internalAnnotation := apiService.Annotations[ServiceAnnotationLoadBalancerInternal]
|
internalAnnotation := apiService.Annotations[ServiceAnnotationLoadBalancerInternal]
|
||||||
if internalAnnotation != "" {
|
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
|
internalELB = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user