Documentation
¶
Index ¶
- Constants
- type Reconciler
- func (r *Reconciler) AddToManager(mgr manager.Manager) error
- func (r *Reconciler) HasSecretOrCredentialsBindingReferenceLabelPredicate() predicate.Predicate
- func (r *Reconciler) MapObjectToProject(log logr.Logger) handler.MapFunc
- func (r *Reconciler) OnlyRelevantCreatesAndUpdates() predicate.Predicate
- func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Constants ¶
const ControllerName = "project-activity"
ControllerName is the name of this controller.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reconciler ¶
type Reconciler struct {
Client client.Client
Config controllermanagerconfigv1alpha1.ProjectControllerConfiguration
Clock clock.Clock
}
Reconciler reconciles Projects and updates the lastActivityTimestamp in the status.
func (*Reconciler) AddToManager ¶
func (r *Reconciler) AddToManager(mgr manager.Manager) error
AddToManager adds Reconciler to the given manager.
func (*Reconciler) HasSecretOrCredentialsBindingReferenceLabelPredicate ¶
func (r *Reconciler) HasSecretOrCredentialsBindingReferenceLabelPredicate() predicate.Predicate
HasSecretOrCredentialsBindingReferenceLabelPredicate returns a predicate which only returns true when the objects have the reference.gardener.cloud/secretbinding or reference.gardener.cloud/credentialsbinding label.
func (*Reconciler) MapObjectToProject ¶
func (r *Reconciler) MapObjectToProject(log logr.Logger) handler.MapFunc
MapObjectToProject is a handler.MapFunc for mapping an object to the Project it belongs to.
func (*Reconciler) OnlyRelevantCreatesAndUpdates ¶
func (r *Reconciler) OnlyRelevantCreatesAndUpdates() predicate.Predicate
OnlyRelevantCreatesAndUpdates returns a predicate that filters CREATE/UPDATE events: - CREATE events: only pass if the object was created within the last hour. This helps to ignore stale create events for existing objects during controller restarts. - UPDATE events: only pass if the resource version changed. This helps to ignore update events that do not change the object (e.g. periodic cache resyncs).