mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
[Issue:#115501] Fix for issue with Loadbalancer policy creation for IPV6 endpoints in Dualstack mode.
This commit is contained in:
parent
fc7b25cf72
commit
5eb6f82c1a
@ -112,8 +112,28 @@ func (hns hns) getAllEndpointsByNetwork(networkName string) (map[string]*(endpoi
|
||||
terminating: false,
|
||||
}
|
||||
endpointInfos[ep.IpConfigurations[0].IpAddress] = endpointInfos[ep.Id]
|
||||
|
||||
if len(ep.IpConfigurations) == 1 {
|
||||
continue
|
||||
}
|
||||
|
||||
// If ipFamilyPolicy is RequireDualStack or PreferDualStack, then there will be 2 IPS (iPV4 and IPV6)
|
||||
// in the endpoint list
|
||||
endpointDualstack := &endpointsInfo{
|
||||
ip: ep.IpConfigurations[1].IpAddress,
|
||||
isLocal: uint32(ep.Flags&hcn.EndpointFlagsRemoteEndpoint) == 0,
|
||||
macAddress: ep.MacAddress,
|
||||
hnsID: ep.Id,
|
||||
hns: hns,
|
||||
// only ready and not terminating endpoints were added to HNS
|
||||
ready: true,
|
||||
serving: true,
|
||||
terminating: false,
|
||||
}
|
||||
endpointInfos[ep.IpConfigurations[1].IpAddress] = endpointDualstack
|
||||
}
|
||||
klog.V(3).InfoS("Queried endpoints from network", "network", networkName)
|
||||
klog.V(5).InfoS("Queried endpoints details", "network", networkName, "endpointInfos", endpointInfos)
|
||||
return endpointInfos, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user