Documentation
¶
Overview ¶
Package gc is the owner garbage collector (ADR-0170): it deletes every object whose controller OwnerReference names an owner that no longer exists, or exists under another UID. It runs beside the controller in background mode: a watch on each owner kind collects a deleted owner's children soon after the delete, and a periodic sweep over every child kind catches what a crash or a dropped watch missed.
Index ¶
Constants ¶
const DefaultInterval = 5 * time.Minute
DefaultInterval is the sweep period when Deps.Interval is 0 (config controller.gcSweepInterval).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector deletes dead-owned children. Its passes are stateless and may run concurrently.
func (*Collector) CollectNamespace ¶
CollectNamespace runs one pass over every child kind in ns (empty ns is every namespace). List errors are returned joined. Safe beside Run.