kubernetes/pkg/proxy
ytcisme 3616ffa284 proxy/ipvs: avoid per-interface RTM_GETADDR dump in GetAllLocalAddressesExcept
GetAllLocalAddressesExcept previously iterated over net.Interfaces() and
called iface.Addrs() for each interface. iface.Addrs() internally performs
a full RTM_GETADDR netlink dump for the entire node and then filters in
user space. With many interfaces and many addresses (for example tens of
thousands of ClusterIPs bound to kube-ipvs0) the cost is
O(N_interfaces * N_addresses) and dominates syncProxyRules latency.

This change replaces the per-interface loop with a single
netlink.AddrList(nil, unix.AF_UNSPEC) call that dumps all addresses on
the node in one RTM_GETADDR request, then filters by LinkIndex in user
space. This makes the call O(N_addresses) and avoids the per-interface
fan-out.

On a production node with 251 interfaces and 19757 addresses, this
reduces GetAllLocalAddressesExcept latency from 34.8s to 60ms (~705x).
2026-05-24 13:31:10 +08:00
..
apis Explicitly disable validation-gen where not needed 2026-05-12 12:49:01 -04:00
config
conntrack Consistently import pkg/proxy/apis/config as kubeproxyconfig 2026-04-29 08:51:50 -04:00
healthcheck fix(kube-proxy): fix health check binding failure in case of dual-stack 2026-03-03 14:20:27 +02:00
iptables Pass complete KubeProxyConfiguration to NewProxier methods 2026-04-29 10:35:12 -04:00
ipvs proxy/ipvs: avoid per-interface RTM_GETADDR dump in GetAllLocalAddressesExcept 2026-05-24 13:31:10 +08:00
kubemark Consistently import pkg/proxy/apis/config as kubeproxyconfig 2026-04-29 08:51:50 -04:00
metaproxier Adds unit tests for pkg/proxy/metaproxier, which implements dual-stack kube-proxy 2026-04-23 20:35:02 +05:30
metrics
nftables Pass complete KubeProxyConfiguration to NewProxier methods 2026-04-29 10:35:12 -04:00
runner
util proxy/utils: Use net.JoinHostPort to format address. 2026-02-15 16:53:17 +01:00
winkernel Pass complete KubeProxyConfiguration to NewProxier methods 2026-04-29 10:35:12 -04:00
doc.go
endpoint.go
endpointschangetracker.go
endpointschangetracker_test.go
endpointslicecache.go
endpointslicecache_test.go
node.go Pass complete KubeProxyConfiguration to NewNodeManager 2026-04-29 10:35:14 -04:00
node_test.go
OWNERS
servicechangetracker.go
servicechangetracker_test.go Move dump package from apimachinery to k8s.io/utils 2026-02-12 07:34:19 -05:00
serviceport.go KEP-5707: Deprecate Service.spec.externalIPs 2026-03-01 11:49:27 +02:00
topology.go
topology_test.go
types.go