mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 21:25:09 +00:00
Fix ipv6 ip allocation method for standard lb
This commit is contained in:
@@ -546,8 +546,12 @@ func (az *Cloud) ensurePublicIPExists(service *v1.Service, pipName string, domai
|
|||||||
if ipv6 {
|
if ipv6 {
|
||||||
pip.PublicIPAddressVersion = network.IPv6
|
pip.PublicIPAddressVersion = network.IPv6
|
||||||
klog.V(2).Infof("service(%s): pip(%s) - creating as ipv6 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP)
|
klog.V(2).Infof("service(%s): pip(%s) - creating as ipv6 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP)
|
||||||
// static allocation on IPv6 on Azure is not allowed
|
|
||||||
pip.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod = network.Dynamic
|
pip.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod = network.Dynamic
|
||||||
|
if az.useStandardLoadBalancer() {
|
||||||
|
// standard sku must have static allocation method for ipv6
|
||||||
|
pip.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod = network.Static
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
pip.PublicIPAddressVersion = network.IPv4
|
pip.PublicIPAddressVersion = network.IPv4
|
||||||
klog.V(2).Infof("service(%s): pip(%s) - creating as ipv4 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP)
|
klog.V(2).Infof("service(%s): pip(%s) - creating as ipv4 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP)
|
||||||
|
Reference in New Issue
Block a user