Documentation
¶
Index ¶
Constants ¶
const ControllerName = "controllerregistration-cluster-finalizer"
ControllerName is the name of this controller.
const FinalizerName = "core.gardener.cloud/controllerregistration"
FinalizerName is the finalizer used by this controller.
Variables ¶
This section is empty.
Functions ¶
func ControllerInstallationEventHandlerForSeed ¶
func ControllerInstallationEventHandlerForSeed() handler.EventHandler
ControllerInstallationEventHandlerForSeed returns an event handler that enqueues the seed referenced by a ControllerInstallation on delete and update events. On updates, the old object's `.spec.seedRef` is used because the seed reconciler clears `.spec.seedRef` when a seed no longer needs a ControllerInstallation.
func ControllerInstallationEventHandlerForShoot ¶
func ControllerInstallationEventHandlerForShoot() handler.EventHandler
ControllerInstallationEventHandlerForShoot returns an event handler that enqueues the shoot referenced by a ControllerInstallation on delete events.
Types ¶
type Reconciler ¶
type Reconciler struct {
Client client.Client
NewTargetObjectFunc func() client.Object
NewControllerInstallationSelector func(obj client.Object) client.MatchingFields
}
Reconciler reconciles Seeds or Shoots and manages the finalizer on these objects depending on whether ControllerInstallation objects exist in the system. It basically protects Seeds from being deleted, if there are still ControllerInstallations referencing it, to make sure we are able to clean up ControllerInstallation objects of terminating Seeds/Shoots.
func (*Reconciler) AddToManager ¶
func (r *Reconciler) AddToManager(mgr manager.Manager, controllerInstallationEventHandler handler.EventHandler, objKind string) error
AddToManager adds Reconciler to the given manager.