Skip to content

Commit

Permalink
Merge pull request #703 from tomkerkhove/ilb-private
Browse files Browse the repository at this point in the history
feat: Provide IPv6 support for internal load balancer
  • Loading branch information
k8s-ci-robot authored Jul 19, 2021
2 parents 61c726d + 2876b91 commit 770306c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/provider/azure_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1786,13 +1786,6 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv
// construct FrontendIPConfigurationPropertiesFormat
var fipConfigurationProperties *network.FrontendIPConfigurationPropertiesFormat
if isInternal {
// azure does not support ILB for IPv6 yet.
// TODO: remove this check when ILB supports IPv6 *and* the SDK
// have been rev'ed to 2019* version
if utilnet.IsIPv6String(service.Spec.ClusterIP) {
return nil, false, fmt.Errorf("ensure(%s): lb(%s) - internal load balancers does not support IPv6", serviceName, lbName)
}

subnetName := subnet(service)
if subnetName == nil {
subnetName = &az.SubnetName
Expand All @@ -1810,6 +1803,10 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv
Subnet: &subnet,
}

if utilnet.IsIPv6String(service.Spec.ClusterIP) {
configProperties.PrivateIPAddressVersion = network.IPVersionIPv6
}

loadBalancerIP := service.Spec.LoadBalancerIP
if loadBalancerIP != "" {
configProperties.PrivateIPAllocationMethod = network.IPAllocationMethodStatic
Expand Down

0 comments on commit 770306c

Please sign in to comment.