Documentation
¶
Index ¶
- Constants
- func NewReadyCondition(result Result) metav1.Condition
- func PatchReapplyTimestamp(ctx context.Context, kubeClient client.Client, obj client.Object) (time.Duration, error)
- func ReapplyPeriod(obj metav1.Object) (time.Duration, bool, error)
- func ReapplyTimestamp(obj metav1.Object) (time.Time, bool, error)
- func ShouldReapply(obj metav1.Object) (bool, error)
- type ControllerSetupBuilder
- type Reconciler
- func (r *Reconciler[T]) For() (client.Object, builder.Predicates)
- func (r *Reconciler[T]) Reconcile(ctx context.Context, req ctrl.Request) (reconcile.Result, error)
- func (r *Reconciler[T]) ReconcileState(ctx context.Context, t *T) (Result, error)
- func (r *Reconciler[T]) SetupWithManager(mgr ctrl.Manager, defaultOptions controller.Options) error
- type ReconcilerOptionFn
- type Result
- type StateHandler
- type StatusObject
- type UnstructuredStateReconciler
Constants ¶
View Source
const ( ReadyReasonError = "Error" ReadyReasonPending = "Pending" ReadyReasonSettled = "Settled" )
View Source
const AnnotationReapplyTimestamp = "mongodb.internal.com/reapply-timestamp"
Variables ¶
This section is empty.
Functions ¶
func NewReadyCondition ¶
func PatchReapplyTimestamp ¶
Types ¶
type ControllerSetupBuilder ¶
type ControllerSetupBuilder = ctrlrtbuilder.TypedBuilder[reconcile.Request]
type Reconciler ¶
type Reconciler[T any] struct { // contains filtered or unexported fields }
func NewStateReconciler ¶
func NewStateReconciler[T any](target StateHandler[T], options ...ReconcilerOptionFn[T]) *Reconciler[T]
func NewUnstructuredStateReconciler ¶
func NewUnstructuredStateReconciler(target UnstructuredStateReconciler, gvk schema.GroupVersionKind) *Reconciler[unstructured.Unstructured]
func (*Reconciler[T]) For ¶
func (r *Reconciler[T]) For() (client.Object, builder.Predicates)
func (*Reconciler[T]) ReconcileState ¶
func (r *Reconciler[T]) ReconcileState(ctx context.Context, t *T) (Result, error)
func (*Reconciler[T]) SetupWithManager ¶
func (r *Reconciler[T]) SetupWithManager(mgr ctrl.Manager, defaultOptions controller.Options) error
type ReconcilerOptionFn ¶
type ReconcilerOptionFn[T any] func(*Reconciler[T])
func WithCluster ¶
func WithCluster[T any](c cluster.Cluster) ReconcilerOptionFn[T]
func WithReapplySupport ¶
func WithReapplySupport[T any](supportReapply bool) ReconcilerOptionFn[T]
type StateHandler ¶
type StateHandler[T any] interface { SetupWithManager(ctrl.Manager, reconcile.Reconciler, controller.Options) error For() (client.Object, builder.Predicates) HandleInitial(context.Context, *T) (Result, error) HandleImportRequested(context.Context, *T) (Result, error) HandleImported(context.Context, *T) (Result, error) HandleCreating(context.Context, *T) (Result, error) HandleCreated(context.Context, *T) (Result, error) HandleUpdating(context.Context, *T) (Result, error) HandleUpdated(context.Context, *T) (Result, error) HandleDeletionRequested(context.Context, *T) (Result, error) HandleDeleting(context.Context, *T) (Result, error) }
type StatusObject ¶
type UnstructuredStateReconciler ¶
type UnstructuredStateReconciler = StateHandler[unstructured.Unstructured]
Click to show internal directories.
Click to hide internal directories.