garbagecollector

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GarbageCollector

type GarbageCollector struct {
	// contains filtered or unexported fields
}

The GarbageCollector controller monitors manifestworks and associated owner resources, managing the relationship between them and deleting manifestworks when all owner resources are removed. It currently supports only background deletion policy, lacking support for foreground and orphan policies. To prevent overwhelming the API server, the garbage collector operates with rate limiting. It is designed to run alongside the cloudevents source work client, eg. each addon controller utilizing the cloudevents driver should be accompanied by its own garbage collector.

func NewGarbageCollector

func NewGarbageCollector(
	workClientHolder *cloudeventswork.ClientHolder,
	workInformer workv1informers.ManifestWorkInformer,
	metadataClient metadata.Interface,
	ownerGVRFilters map[schema.GroupVersionResource]*metav1.ListOptions) *GarbageCollector

NewGarbageCollector creates a new garbage collector instance.

func (*GarbageCollector) Run

func (gc *GarbageCollector) Run(ctx context.Context, workers int)

Run starts garbage collector monitors and workers.

type ObjectMetaForOwnerRefsPatch

type ObjectMetaForOwnerRefsPatch struct {
	ResourceVersion string                  `json:"resourceVersion"`
	OwnerReferences []metav1.OwnerReference `json:"ownerReferences"`
}

ObjectMetaForOwnerRefsPatch defines object meta struct for owner references patch operation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL