lifecycle

package
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ConditionReady = "Ready"
)
View Source
const SpreadReconcileRefreshLabel = "openmfp.io/refresh-reconcile"

Variables

This section is empty.

Functions

This section is empty.

Types

type LifecycleManager

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

func NewLifecycleManager

func NewLifecycleManager(log *logger.Logger, operatorName string, controllerName string, client client.Client, subroutines []Subroutine) *LifecycleManager

func (*LifecycleManager) Reconcile

func (l *LifecycleManager) Reconcile(ctx context.Context, req ctrl.Request, instance RuntimeObject) (ctrl.Result, error)

func (*LifecycleManager) SetupWithManager

func (l *LifecycleManager) SetupWithManager(mgr ctrl.Manager, maxReconciles int, reconcilerName string, instance RuntimeObject, debugLabelValue string, r reconcile.Reconciler, log *logger.Logger, eventPredicates ...predicate.Predicate) error

func (*LifecycleManager) SetupWithManagerBuilder added in v0.67.0

func (l *LifecycleManager) SetupWithManagerBuilder(mgr ctrl.Manager, maxReconciles int, reconcilerName string, instance RuntimeObject, debugLabelValue string, log *logger.Logger, eventPredicates ...predicate.Predicate) (*builder.Builder, error)

func (*LifecycleManager) WithConditionManagement added in v0.21.0

func (l *LifecycleManager) WithConditionManagement() *LifecycleManager

func (*LifecycleManager) WithPrepareContextFunc added in v0.66.0

func (l *LifecycleManager) WithPrepareContextFunc(prepareFunction PrepareContextFunc) *LifecycleManager

WithPrepareContextFunc allows to set a function that prepares the context before each reconciliation This can be used to add additional information to the context that is needed by the subroutines You need to return a new context and an OperatorError in case of an error

func (*LifecycleManager) WithSpreadingReconciles added in v0.5.0

func (l *LifecycleManager) WithSpreadingReconciles() *LifecycleManager

WithSpreadingReconciles sets the LifecycleManager to spread out the reconciles

type PrepareContextFunc added in v0.66.0

type PrepareContextFunc func(ctx context.Context, instance RuntimeObject) (context.Context, errors.OperatorError)

type RuntimeObject

type RuntimeObject interface {
	runtime.Object
	v1.Object
}

type RuntimeObjectConditions added in v0.21.0

type RuntimeObjectConditions interface {
	GetConditions() []metav1.Condition
	SetConditions([]metav1.Condition)
}

func MustToRuntimeObjectConditionsInterface added in v0.73.0

func MustToRuntimeObjectConditionsInterface(instance RuntimeObject, log *logger.Logger) RuntimeObjectConditions

type RuntimeObjectSpreadReconcileStatus added in v0.5.0

type RuntimeObjectSpreadReconcileStatus interface {
	GetGeneration() int64
	GetObservedGeneration() int64
	SetObservedGeneration(int64)
	GetNextReconcileTime() v1.Time
	SetNextReconcileTime(time v1.Time)
}

func MustToRuntimeObjectSpreadReconcileStatusInterface added in v0.29.0

func MustToRuntimeObjectSpreadReconcileStatusInterface(instance RuntimeObject, log *logger.Logger) RuntimeObjectSpreadReconcileStatus

type Subroutine

type Subroutine interface {
	Process(ctx context.Context, instance RuntimeObject) (ctrl.Result, errors.OperatorError)
	Finalize(ctx context.Context, instance RuntimeObject) (ctrl.Result, errors.OperatorError)
	GetName() string
	Finalizers() []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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