controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ShootNamespaceLabelKey and ShootNamespaceLabelValue are used to tag each seed namespace which contains
	// a shoot
	ShootNamespaceLabelKey = "gardener.cloud/role"
	// ShootNamespaceLabelValue and ShootNamespaceLabelKey are used to tag each seed namespace which contains
	// a shoot
	ShootNamespaceLabelValue = "shoot"
)

Variables

This section is empty.

Functions

func NewReconciler

func NewReconciler(actuator Actuator, controlledObjectPrototype client.Object, log logr.Logger) reconcile.Reconciler

NewReconciler creates a new Reconciler which delegates the real work to the specified Actuator.

Types

type Actuator

type Actuator interface {
	// CreateOrUpdate reconciles object creation or update.
	CreateOrUpdate(context.Context, client.Object) (time.Duration, error)
	// Delete reconciles object deletion.
	Delete(context.Context, client.Object) (time.Duration, error)
}

Actuator acts upon objects being reconciled by a Reconciler.

type AddArgs

type AddArgs struct {
	Actuator       Actuator
	ControllerName string
	// ControllerOptions are the controller options to use when creating a controller.
	// The Reconciler field is always overridden with a reconciler created from the given actuator.
	ControllerOptions kctl.Options
	// ControlledObjectType is the object type to watch.
	ControlledObjectType client.Object
	// Predicates are the predicates to use when watching objects.
	Predicates []predicate.Predicate
	// WatchBuilder defines additional watches that should be set up.
	WatchBuilder gutil.WatchBuilder
}

AddArgs are the arguments required when adding a controller to a manager.

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

Factory is used to create new Controller instances. It supports redirecting some function calls, for the purpose of test isolation

func NewControllerFactory

func NewControllerFactory() *Factory

NewControllerFactory creates Factory instances

func (*Factory) AddNewControllerToManager

func (factory *Factory) AddNewControllerToManager(manager manager.Manager, args AddArgs) error

AddNewControllerToManager creates a new controller and adds it to the specified manager, using the specified args.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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