mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Updating EndpointSliceCache sort function to be significantly faster.
The .IP() call that was previously used for sorting resulted in a call to netutil to parse an IP out of an IP:Port string. This was very slow and resulted in this sort taking up ~50% of total CPU util for kube-proxy.
This commit is contained in:
@@ -99,8 +99,8 @@ func TestEndpointsMapFromESC(t *testing.T) {
|
||||
},
|
||||
expectedMap: map[ServicePortName][]*BaseEndpointInfo{
|
||||
makeServicePortName("ns1", "svc1", "port-0"): {
|
||||
&BaseEndpointInfo{Endpoint: "10.0.1.1:80"},
|
||||
&BaseEndpointInfo{Endpoint: "10.0.1.10:80"},
|
||||
&BaseEndpointInfo{Endpoint: "10.0.1.1:80"},
|
||||
&BaseEndpointInfo{Endpoint: "10.0.1.2:80"},
|
||||
&BaseEndpointInfo{Endpoint: "10.0.1.3:80"},
|
||||
&BaseEndpointInfo{Endpoint: "10.0.1.4:80"},
|
||||
|
||||
Reference in New Issue
Block a user