Documentation ¶
Index ¶
- Constants
- type Reconciler
- func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager, ...) error
- func (r *Reconciler) MapObjectKindToControllerInstallations(objectKind string, newObjectListFunc func() client.ObjectList) mapper.MapFunc
- func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Constants ¶
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(ctx context.Context, 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.