The WatchListClient feature is enabled for kube-controller-manager, but
namespace-controller misses the necessary "watch" permission, which
results in 30 error logs being generated every time a namespace is
deleted and falling back to the standard LIST semantics.
Signed-off-by: Quan Tian <quan.tian@broadcom.com>
- Add `release-team-subproject-leads` alias to approvers/reviewers
- Add 1.32 Release Notes Lead to approvers/reviewers
- Prune previous Release Team entries
Signed-off-by: Stephen Augustus <foo@auggie.dev>
The methods NewFakeClock were using a testing dependency as a parameter,
to avoid breaking compatibility and to remove this dependency, just use
the clock.Clock interface.
If we have to do it again most probable we have chosen other pattern and
for sure other names, but now is too late.
A placeholder entry is added to the cache while the permanent entry is being constructed. A data
race existed where the placeholder entry itself could be mutated after its address may have been
given to other callers.
Several tests leaked goroutines. All of those get fixed where possible
without API changes. Goleak is used to prevent regressions.
One new test specifically covers shutdown of an informer and its event
handlers.
There are situations where it makes more sense to pass a logger through a
call chain, primarily because passing a context would imply that the call chain
should honor cancellation even though there is a different shutdown mechanism.
Using the *WithContext variants would cause additional overhead for
klog.NewContext, which hurts in particular for HandleCrash because that
function is typically a nop that doesn't actually need to log
anything. HandleCrashWithLogger avoids that overhead.
For HandleError that is less relevant because it always logs, but for the sake
of symmetry it also gets added.
Putting klog.Logger (= logr.Logger) into the public Kubernetes Go API is okay
because it's no longer realistic that these packages can ever drop the klog
dependency. Callers using slog as logger in their binary can use
https://github.com/veqryn/slog-context to store a slog.Logger in a context and
then call the *WithContext variants, klog.FromContext will be able to use it.
This is probably very rare, so there's no need for *WithSlog variants.
While at it, unit testing gets enhanced and logging in panic handlers gets
improved such that they are guaranteed to get a saner location when not
doing any caller skipping. Previously, this was undefined.