stale

package
v1.56.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "project-stale"

ControllerName is the name of this controller.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	Config config.ProjectControllerConfiguration
	Client client.Client
	Clock  clock.Clock
}

Reconciler reconciles Projects, marks them as stale and auto-deletes them after a certain time if not in-use.

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(mgr manager.Manager) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) ProjectPredicate

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

ProjectPredicate returns true for 'CREATE' events. For 'UPDATE' events, it returns true when the lastActivityTimestamp in the status is unchanged or the generation is different from the observed generation.

func (*Reconciler) Reconcile

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

Reconcile reconciles Projects, marks them as stale and auto-deletes them after a certain time if not in-use.

Jump to

Keyboard shortcuts

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