From 5faf72d54ec7b11264b036607ff00f43c3e902d3 Mon Sep 17 00:00:00 2001 From: Tom Kerkhove Date: Sat, 17 Jul 2021 07:50:03 +0000 Subject: [PATCH] feat: Provide IPv6 support for internal load balancer Signed-off-by: GitHub --- pkg/provider/azure_loadbalancer.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkg/provider/azure_loadbalancer.go b/pkg/provider/azure_loadbalancer.go index 3fbe451c8e..ca243c55a1 100644 --- a/pkg/provider/azure_loadbalancer.go +++ b/pkg/provider/azure_loadbalancer.go @@ -1738,13 +1738,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 @@ -1762,6 +1755,10 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv Subnet: &subnet, } + if utilnet.IsIPv6String(service.Spec.ClusterIP) { + configProperties.PrivateIPAddressVersion = network.IPv6 + } + loadBalancerIP := service.Spec.LoadBalancerIP if loadBalancerIP != "" { configProperties.PrivateIPAllocationMethod = network.Static