Merge pull request #82597 from aramase/standard-lb-ipv6

Fix ipv6 ip allocation method for standard lb
This commit is contained in:
Kubernetes Prow Robot 2019-09-16 23:16:23 -07:00 committed by GitHub
commit 31008f7efd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -546,8 +546,12 @@ func (az *Cloud) ensurePublicIPExists(service *v1.Service, pipName string, domai
if 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)
// static allocation on IPv6 on Azure is not allowed
pip.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod = network.Dynamic
if az.useStandardLoadBalancer() {
// standard sku must have static allocation method for ipv6
pip.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod = network.Static
}
} else {
pip.PublicIPAddressVersion = network.IPv4
klog.V(2).Infof("service(%s): pip(%s) - creating as ipv4 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP)