Skip to content

Commit

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

[release-1.23] 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 afb5287 + 3c0d3a7 commit e58d16b
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 @@ -2194,7 +2194,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 e58d16b

Please sign in to comment.