Skip to content

Commit

Permalink
Merge pull request #1122 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…1109-to-release-1.1

[release-1.1] Fix: enable public access if sourceRange is specified when lb is in internal mode
  • Loading branch information
k8s-ci-robot committed Feb 9, 2022
2 parents 1b8cd14 + 346b126 commit 7cd3f79
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 7cd3f79

Please sign in to comment.