controller

package
v0.21.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller = TypedController[mcreconcile.Request]

Controller implements a Kubernetes API. A Controller manages a work queue fed reconcile.Requests from source.Sources. Work is performed through the reconcile.Reconciler for each enqueued item. Work typically is reads and writes Kubernetes objects to make the system state match the state specified in the object Spec.

func New

func New(name string, mgr mcmanager.Manager, options Options) (Controller, error)

New returns a new Controller registered with the Manager. The Manager will ensure that shared Caches have been synced before the Controller is Started.

The name must be unique as it is used to identify the controller in metrics and logs.

func NewUnmanaged

func NewUnmanaged(name string, mgr mcmanager.Manager, options Options) (Controller, error)

NewUnmanaged returns a new controller without adding it to the manager. The caller is responsible for starting the returned controller.

The name must be unique as it is used to identify the controller in metrics and logs.

type Options

Options are the arguments for creating a new Controller.

type TypedController

type TypedController[request mcreconcile.ClusterAware[request]] interface {
	controller.TypedController[request]
	multicluster.Aware

	// MultiClusterWatch watches the provided Source.
	MultiClusterWatch(src mcsource.TypedSource[client.Object, request]) error
}

TypedController implements an API.

func NewTyped

func NewTyped[request mcreconcile.ClusterAware[request]](name string, mgr mcmanager.Manager, options controller.TypedOptions[request]) (TypedController[request], error)

NewTyped returns a new typed controller registered with the Manager,

The name must be unique as it is used to identify the controller in metrics and logs.

func NewTypedUnmanaged

func NewTypedUnmanaged[request mcreconcile.ClusterAware[request]](name string, mgr mcmanager.Manager, options controller.TypedOptions[request]) (TypedController[request], error)

NewTypedUnmanaged returns a new typed controller without adding it to the manager.

The name must be unique as it is used to identify the controller in metrics and logs.

Jump to

Keyboard shortcuts

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