Skip to content

Commit 31008f7

Browse files
authored
Merge pull request kubernetes#82597 from aramase/standard-lb-ipv6
Fix ipv6 ip allocation method for standard lb
2 parents c7d84ac + 5f46567 commit 31008f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,12 @@ func (az *Cloud) ensurePublicIPExists(service *v1.Service, pipName string, domai
546546
if ipv6 {
547547
pip.PublicIPAddressVersion = network.IPv6
548548
klog.V(2).Infof("service(%s): pip(%s) - creating as ipv6 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP)
549-
// static allocation on IPv6 on Azure is not allowed
549+
550550
pip.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod = network.Dynamic
551+
if az.useStandardLoadBalancer() {
552+
// standard sku must have static allocation method for ipv6
553+
pip.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod = network.Static
554+
}
551555
} else {
552556
pip.PublicIPAddressVersion = network.IPv4
553557
klog.V(2).Infof("service(%s): pip(%s) - creating as ipv4 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP)

0 commit comments

Comments
 (0)