controller-runtimesigs.k8s.io/controller-runtime/pkg/finalizer Index | Files

package finalizer

import "sigs.k8s.io/controller-runtime/pkg/finalizer"

Index

Types

type Finalizer

type Finalizer interface {
	Finalize(context.Context, client.Object) (Result, error)
}

Finalizer holds Finalize that will add/remove a finalizer based on the deletion timestamp being set and return an indication of whether the obj needs an update or not.

type Finalizers

type Finalizers interface {
	Registerer
	Finalizer
}

Finalizers implements Registerer and Finalizer to finalize all registered finalizers if the provided object has a deletion timestamp or set all registered finalizers if it does not.

func NewFinalizers

func NewFinalizers() Finalizers

NewFinalizers returns the Finalizers interface.

type Registerer

type Registerer interface {
	Register(key string, f Finalizer) error
}

Registerer holds Register that will check if a key is already registered and error out and it does; and if not registered, it will add the finalizer to the finalizers map as the value for the provided key.

type Result

type Result struct {
	// Updated will be true if at least one of the object's non-status field
	// was updated by some registered finalizer.
	Updated bool
	// StatusUpdated will be true if at least one of the object's status' fields
	// was updated by some registered finalizer.
	StatusUpdated bool
}

Result struct holds information about what parts of an object were updated by finalizer(s).

Source Files

finalizer.go types.go

Version
v0.21.0 (latest)
Published
May 20, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
25 minutes ago

Tools for package owners.