Skip to content

Commit

Permalink
fix: enable public access if sourceRange is specified when lb is in i…
Browse files Browse the repository at this point in the history
…nternal mode
  • Loading branch information
MartinForReal authored and k8s-infra-cherrypick-robot committed Feb 9, 2022
1 parent 1b8cd14 commit 346b126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/provider/azure_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,7 @@ func (az *Cloud) reconcileSecurityGroup(clusterName string, service *v1.Service,

var sourceAddressPrefixes []string
if (sourceRanges == nil || servicehelpers.IsAllowAll(sourceRanges)) && len(serviceTags) == 0 {
if !requiresInternalLoadBalancer(service) {
if !requiresInternalLoadBalancer(service) || len(service.Spec.LoadBalancerSourceRanges) > 0 {
sourceAddressPrefixes = []string{"Internet"}
}
} else {
Expand Down

0 comments on commit 346b126

Please sign in to comment.