Added PlacementCycleState as a third state scope for WAS, alongside pod-level CycleState and PodGroupCycleState.
This is foundational plumbing only — plugin adoption is a follow-up.
Signed-off-by: Travis O'Neal <wtravisoneal@gmail.com>
* Clean unnecessary event references in watch cache interval buffer in time
If this is not done, event if some watch events are aged out from the
watch cache, they will not be GCed during the lifetime of the watcher
that holds references to these events in the watch cache interval
* Add code comment
The sort tool in hack/tools/instrumentation/sort/ shadows /usr/bin/sort
when installed into GOBIN. Scripts like hack/verify-deadcode-elimination.sh
prepend GOBIN to PATH, causing the coreutil sort to be replaced by this
Go binary, which breaks unrelated verifiers.
The tool is not used by any automation, so remove it from the install
line. Also rename the directory from sort/ to metric-sort/ to prevent
future accidental PATH shadowing.
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).
Fixes ci-kubernetes-e2e-kind-golang-tip and ci-kubernetes-unit-golang-tip,
which started failing under Go tip identifying as go1.27 with:
vendor/google.golang.org/grpc/internal/transport/handler_server.go:271:18:
undefined: http2.TrailerPrefix
In x/net v0.54.0, TrailerPrefix was defined only in http2/server.go, which
carries `//go:build !(go1.27 && !http2legacy)` and is therefore excluded
under go1.27. Upstream golang/net commit 1efab4271a moved TrailerPrefix
(and other symbols accidentally dropped by the go1.27 server wrapper) into
common files. That fix is released in v0.55.0.
Tracked in https://github.com/kubernetes/kubernetes/issues/139257
* kubectl: filter top pod metrics using pod field selectors
Signed-off-by: Mujib Ahasan <ahasanmujib8@gmail.com>
* test case added
Signed-off-by: Mujib Ahasan <ahasanmujib8@gmail.com>
* strict condition added for filtering
Signed-off-by: Mujib Ahasan <ahasanmujib8@gmail.com>
---------
Signed-off-by: Mujib Ahasan <ahasanmujib8@gmail.com>