kubernetes/hack/tools
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
..
golangci-lint
instrumentation kube-proxy: detect host CPU count via cpuset.NumCPU instead of cadvisor 2026-06-26 08:01:46 -04:00
publishing-verifier
.gitignore
go.mod
go.sum
go.work
README.md

This directory contains a stub go module used to track version of development tools like the ones needed for linting go sources.