Help us shape the future of Go! Take the 2026 Go Developer Survey

required

package
v1.153.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 29 Imported by: 1

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       gardenletconfigv1alpha1.ControllerInstallationRequiredControllerConfiguration
	Clock        clock.Clock
	SeedName     string
	// SelfHostedShootMeta is set when running in self-hosted shoot mode. It is used to filter
	// ControllerInstallations by their .spec.shootRef instead of .spec.seedRef.
	SelfHostedShootMeta *types.NamespacedName

	Lock                *sync.RWMutex
	KindToRequiredTypes map[string]sets.Set[string]
	// contains filtered or unexported fields
}

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(log logr.Logger, objectKind string, newObjectListFunc func() client.ObjectList) handler.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 enqueues 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) 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