Documentation ¶
Index ¶
- Variables
- func ContinueReconciling() (*reconcile.Result, error)
- func DoNotRequeue() (*reconcile.Result, error)
- func Evaluate(r *reconcile.Result, e error) (reconcile.Result, error)
- func Requeue() (*reconcile.Result, error)
- func RequeueAfter(after time.Duration) (*reconcile.Result, error)
- func RequeueWithError(e error) (*reconcile.Result, error)
- func ShouldHaltOrRequeue(r *ctrl.Result, err error) bool
- func ShouldRequeue(r *ctrl.Result, err error) bool
- type BaseSubreconciler
- func (r *BaseSubreconciler[S]) RecordEvent(obj S, reason string, msg string, args ...interface{})
- func (r *BaseSubreconciler[S]) SetConditionMessageByType(ctx context.Context, obj S, conditionType, msg string) error
- func (r BaseSubreconciler[S]) SetDeletingMessage(ctx context.Context, obj S, msg string) error
- func (r BaseSubreconciler[S]) SetReconcilingMessage(ctx context.Context, obj S, msg string) error
- func (r BaseSubreconciler[S]) SetState(ctx context.Context, obj S, state v1.PhaseCode) error
- type Config
- type Reconciler
- type Subreconciler
Constants ¶
This section is empty.
Variables ¶
var ( // ConditionTypeReady represents the status of the Deployment reconciliation. ConditionTypeReady = "Ready" // ConditionTypeDeleted represents the status used when the custom resource is deleted and the finalizer // operations are must to occur. ConditionTypeDeleted = "Deleted" )
var ( ConditionReasonReconciling = "Reconciling" ConditionReasonReconciled = "Reconciled" ConditionReasonDeleting = "Deleting" ConditionReasonFinalizing = "Finalizing" )
var ( MessageReconciliationInProcess = "Reconciliation in process" MessageReconciliationCompleted = "Reconciliation completed" )
var ErrorUpdatingStatus = "Failed to update resource status"
Functions ¶
func ContinueReconciling ¶
ContinueReconciling indicates that the reconciliation block should continue by returning a nil result and a nil error.
func DoNotRequeue ¶
DoNotRequeue returns a controller result pairing specifying not to requeue.
func Evaluate ¶
Evaluate returns the actual reconcile struct and error. Wrap helpers in this when returning from within the top-level Reconciler.
func Requeue ¶
Requeue returns a controller result pairing specifying to requeue with no error message implied. This returns no error.
func RequeueAfter ¶
RequeueAfter returns a controller result pairing specifying to requeue after the given time.
func RequeueWithError ¶
RequeueWithError returns a controller result pairing specifying to requeue with an error message.
func ShouldHaltOrRequeue ¶
ShouldHaltOrRequeue returns true if reconciler result is not nil or the err is not nil. In theory, the error evaluation is not needed because ShouldRequeue handles it, but it's included in case ShouldHaltOrRequeue is called directly.
Types ¶
type BaseSubreconciler ¶
type BaseSubreconciler[S v1.Resource] struct { client.Client Manager manager.Manager Config Config Recorder record.EventRecorder Tracer trace.Tracer Scheme *runtime.Scheme }
func (*BaseSubreconciler[S]) RecordEvent ¶
func (r *BaseSubreconciler[S]) RecordEvent(obj S, reason string, msg string, args ...interface{})
func (*BaseSubreconciler[S]) SetConditionMessageByType ¶
func (r *BaseSubreconciler[S]) SetConditionMessageByType(ctx context.Context, obj S, conditionType, msg string) error
func (BaseSubreconciler[S]) SetDeletingMessage ¶
func (r BaseSubreconciler[S]) SetDeletingMessage(ctx context.Context, obj S, msg string) error
func (BaseSubreconciler[S]) SetReconcilingMessage ¶
func (r BaseSubreconciler[S]) SetReconcilingMessage(ctx context.Context, obj S, msg string) error
type Config ¶
type Config struct { Timeout *time.Duration `mapstructure:"timeout,omitempty" ` RequeueDelayTime []time.Duration `mapstructure:"requeueDelayTime,omitempty"` MaxConditions int `mapstructure:"maxConditions,omitempty"` Meta map[string]any `mapstructure:"meta,omitempty"` Providers map[provider.GroupID]provider.ProvidersConfig `mapstructure:"providers,omitempty"` }