Documentation ¶
Index ¶
- Constants
- type LifecycleManager
- func (l *LifecycleManager) Reconcile(ctx context.Context, req ctrl.Request, instance RuntimeObject) (ctrl.Result, error)
- func (l *LifecycleManager) SetupWithManager(mgr ctrl.Manager, maxReconciles int, reconcilerName string, ...) error
- func (l *LifecycleManager) SetupWithManagerBuilder(mgr ctrl.Manager, maxReconciles int, reconcilerName string, ...) (*builder.Builder, error)
- func (l *LifecycleManager) WithConditionManagement() *LifecycleManager
- func (l *LifecycleManager) WithPrepareContextFunc(prepareFunction PrepareContextFunc) *LifecycleManager
- func (l *LifecycleManager) WithSpreadingReconciles() *LifecycleManager
- type PrepareContextFunc
- type RuntimeObject
- type RuntimeObjectConditions
- type RuntimeObjectSpreadReconcileStatus
- type Subroutine
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 (*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 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 }
Click to show internal directories.
Click to hide internal directories.