required

package
v1.72.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "controllerinstallation-required"

ControllerName is the name of this controller.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	GardenClient client.Client
	SeedClient   client.Client
	Config       config.ControllerInstallationRequiredControllerConfiguration
	Clock        clock.Clock
	SeedName     string

	Lock                *sync.RWMutex
	KindToRequiredTypes map[string]sets.Set[string]
}

Reconciler reconciles ControllerInstallations. It checks whether they are still required by using the <KindToRequiredTypes> map.

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(mgr manager.Manager, gardenCluster, seedCluster cluster.Cluster) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) MapObjectKindToControllerInstallations

func (r *Reconciler) MapObjectKindToControllerInstallations(objectKind string, newObjectListFunc func() client.ObjectList) mapper.MapFunc

MapObjectKindToControllerInstallations returns a mapper function for the given extension kind that lists all existing extension resources of the given kind and stores the respective types in the `KindToRequiredTypes` map. Afterwards, it enqueue all ControllerInstallations for the seed that are referring to ControllerRegistrations responsible for the given kind. The returned reconciler doesn't care about which object was created/updated/deleted, it just cares about being triggered when some object of the kind, it is responsible for, is created/updated/deleted.

func (*Reconciler) ObjectPredicate

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

ObjectPredicate returns true for 'create' and 'update' events. For updates, it only returns true when the extension type has changed.

func (*Reconciler) Reconcile

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

Reconcile performs the main reconciliation logic.

Jump to

Keyboard shortcuts

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