You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(k8score): idle reaper for namespace-scoped dynamic informers
Per-namespace dynamic informers (the B2.1 model) can accumulate over the
life of a long-running, namespace-restricted deployment as different
namespaces get watched. Add an idle reaper that stops a namespace-scoped
informer after InformerIdleTTL (default 30m) without a read, re-creating it
transparently on the next access.
Liveness is the read path itself: List/Get/Count/EnsureWatching stamp the
entry's lastAccess. The frontend re-lists open views every 60-120s (React
Query refetchInterval), and SSE topology rebuilds also list — both flow
through that stamp — so an open view's informer is never reaped out from
under it, and an explicit SSE lease/refcount is unnecessary. Cluster-wide
informers (one per GVR, serve every namespace) are exempt; a negative TTL
disables reaping.
To make eviction safe, informers are now constructed directly via
NewFilteredDynamicInformer instead of through a shared factory: a factory
caches one informer per GVR and would hand back the stopped instance after a
reap (a SharedInformer cannot be re-Run). Standalone informers, each under
its own cancelable context, can be stopped and re-created freely. This also
removes the per-namespace factory map and simplifies Stop().
Builds on #770.
0 commit comments