kubernetes/pkg/proxy/conntrack
Davanum Srinivas 92ce184653
kube-proxy: detect host CPU count via cpuset.NumCPU instead of cadvisor
detectNumCPU sized nf_conntrack_max using github.com/google/cadvisor/lib
machine topology. nf_conntrack_max is host-wide, so it must be sized from the
node's CPU count, not runtime.NumCPU(): the latter honors the process cpuset
and undercounts when kube-proxy runs under a static CPU policy, which is the
behavior cadvisor worked around (kubernetes/kubernetes#99225).

Use cpuset.NumCPU() from k8s.io/utils, which reads the node's online CPU count
from /sys/devices/system/cpu/online, with a runtime.NumCPU() fallback. This
drops the cadvisor dependency from pkg/proxy/conntrack and bumps k8s.io/utils
to pick up cpuset.NumCPU.
2026-06-26 08:01:46 -04:00
..
.import-restrictions import-boss: allow github.com/google/cadvisor/lib only where used; forbid the full module 2026-06-20 17:27:17 -04:00
cleanup.go kube-proxy: clear stale conntrack entries for UDP services with no endpoints 2026-06-11 19:01:48 +01:00
cleanup_test.go kube-proxy: clear stale conntrack entries for UDP services with no endpoints 2026-06-11 19:01:48 +01:00
conntrack.go build: remove deprecated '// +build' tag 2025-12-18 12:16:21 +01:00
conntrack_test.go build: remove deprecated '// +build' tag 2025-12-18 12:16:21 +01:00
doc.go
fake.go build: remove deprecated '// +build' tag 2025-12-18 12:16:21 +01:00
filter.go build: remove deprecated '// +build' tag 2025-12-18 12:16:21 +01:00
filter_test.go build: remove deprecated '// +build' tag 2025-12-18 12:16:21 +01:00
sysctls.go kube-proxy: detect host CPU count via cpuset.NumCPU instead of cadvisor 2026-06-26 08:01:46 -04:00
sysctls_test.go Consistently import pkg/proxy/apis/config as kubeproxyconfig 2026-04-29 08:51:50 -04:00