mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
feat: Provide IPv6 support for internal load balancer
This commit is contained in:
parent
59c0523bca
commit
9f09064104
@ -1253,13 +1253,6 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
|
|||||||
// construct FrontendIPConfigurationPropertiesFormat
|
// construct FrontendIPConfigurationPropertiesFormat
|
||||||
var fipConfigurationProperties *network.FrontendIPConfigurationPropertiesFormat
|
var fipConfigurationProperties *network.FrontendIPConfigurationPropertiesFormat
|
||||||
if isInternal {
|
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, fmt.Errorf("ensure(%s): lb(%s) - internal load balancers does not support IPv6", serviceName, lbName)
|
|
||||||
}
|
|
||||||
|
|
||||||
subnetName := subnet(service)
|
subnetName := subnet(service)
|
||||||
if subnetName == nil {
|
if subnetName == nil {
|
||||||
subnetName = &az.SubnetName
|
subnetName = &az.SubnetName
|
||||||
@ -1277,6 +1270,10 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
|
|||||||
Subnet: &subnet,
|
Subnet: &subnet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if utilnet.IsIPv6String(service.Spec.ClusterIP) {
|
||||||
|
configProperties.PrivateIPAddressVersion = network.IPv6
|
||||||
|
}
|
||||||
|
|
||||||
loadBalancerIP := service.Spec.LoadBalancerIP
|
loadBalancerIP := service.Spec.LoadBalancerIP
|
||||||
if loadBalancerIP != "" {
|
if loadBalancerIP != "" {
|
||||||
configProperties.PrivateIPAllocationMethod = network.Static
|
configProperties.PrivateIPAllocationMethod = network.Static
|
||||||
|
Loading…
Reference in New Issue
Block a user