@@ -1080,15 +1080,9 @@ func (az *Cloud) reconcileLoadBalancerRule(
1080
1080
BackendPort : to .Int32Ptr (port .Port ),
1081
1081
DisableOutboundSnat : to .BoolPtr (az .disableLoadBalancerOutboundSNAT ()),
1082
1082
EnableTCPReset : enableTCPReset ,
1083
+ EnableFloatingIP : to .BoolPtr (true ),
1083
1084
},
1084
1085
}
1085
- // LB does not support floating IPs for IPV6 rules
1086
- if utilnet .IsIPv6String (service .Spec .ClusterIP ) {
1087
- expectedRule .BackendPort = to .Int32Ptr (port .NodePort )
1088
- expectedRule .EnableFloatingIP = to .BoolPtr (false )
1089
- } else {
1090
- expectedRule .EnableFloatingIP = to .BoolPtr (true )
1091
- }
1092
1086
1093
1087
if protocol == v1 .ProtocolTCP {
1094
1088
expectedRule .LoadBalancingRulePropertiesFormat .IdleTimeoutInMinutes = lbIdleTimeout
@@ -1158,8 +1152,6 @@ func (az *Cloud) reconcileSecurityGroup(clusterName string, service *v1.Service,
1158
1152
}
1159
1153
expectedSecurityRules := []network.SecurityRule {}
1160
1154
1161
- ipv6 := utilnet .IsIPv6String (service .Spec .ClusterIP )
1162
-
1163
1155
if wantLb {
1164
1156
expectedSecurityRules = make ([]network.SecurityRule , len (ports )* len (sourceAddressPrefixes ))
1165
1157
@@ -1171,7 +1163,7 @@ func (az *Cloud) reconcileSecurityGroup(clusterName string, service *v1.Service,
1171
1163
for j := range sourceAddressPrefixes {
1172
1164
ix := i * len (sourceAddressPrefixes ) + j
1173
1165
securityRuleName := az .getSecurityRuleName (service , port , sourceAddressPrefixes [j ])
1174
- securityRule : = network.SecurityRule {
1166
+ expectedSecurityRules [ ix ] = network.SecurityRule {
1175
1167
Name : to .StringPtr (securityRuleName ),
1176
1168
SecurityRulePropertiesFormat : & network.SecurityRulePropertiesFormat {
1177
1169
Protocol : * securityProto ,
@@ -1183,13 +1175,6 @@ func (az *Cloud) reconcileSecurityGroup(clusterName string, service *v1.Service,
1183
1175
Direction : network .SecurityRuleDirectionInbound ,
1184
1176
},
1185
1177
}
1186
- // For IPv6, the destination port needs to be node port and Destination Any as floating IPs
1187
- // not supported for IPv6
1188
- if ipv6 {
1189
- securityRule .SecurityRulePropertiesFormat .DestinationPortRange = to .StringPtr (strconv .Itoa (int (port .NodePort )))
1190
- securityRule .SecurityRulePropertiesFormat .DestinationAddressPrefix = to .StringPtr ("*" )
1191
- }
1192
- expectedSecurityRules [ix ] = securityRule
1193
1178
}
1194
1179
}
1195
1180
}
0 commit comments