reference

package
v1.108.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "reference"

ControllerName is the name of this controller.

Variables

View Source
var (

	// UserManagedSelector is a selector for objects which are managed by users and not created by Gardener.
	UserManagedSelector = client.MatchingLabelsSelector{Selector: labels.NewSelector().Add(noGardenRole)}
)

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	Client                      client.Client
	ConcurrentSyncs             *int
	NewObjectFunc               func() client.Object
	NewObjectListFunc           func() client.ObjectList
	GetNamespace                func(client.Object) string
	GetReferencedSecretNames    func(client.Object) []string
	GetReferencedConfigMapNames func(client.Object) []string
	ReferenceChangedPredicate   func(oldObj, newObj client.Object) bool
}

Reconciler checks the object in the given request for Secret or ConfigMap references to further objects in order to protect them from deletions as long as they are still referenced.

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(mgr manager.Manager) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) Predicate

func (r *Reconciler) Predicate() predicate.Predicate

Predicate reacts on CREATE and on UPDATE events.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile performs the check.

Jump to

Keyboard shortcuts

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