Versions in this module Expand all Collapse all v0 v0.28.6 May 22, 2022 Changes in this version + const DefaultRecreateRequeueDelay + const ReconciledObjectStateAbsent + const ReconciledObjectStatePresent + const ReconciledObjectStatePurged + const StateAbsent + const StateCreated + const StatePresent + var DefaultBackoff = wait.Backoff + var DefaultRecreateEnabledGroupKinds = []schema.GroupKind + func EnqueueByOwnerAnnotationMapper() handler.MapFunc + func IgnoreManagedFields() patch.CalculateOption + func IstioSidecarInjectorExistsCheck(c client.Client, namespace string) wait.CustomResourceConditionCheck + func KeepLabelsAndAnnotationsModifer(current, desired runtime.Object) error + func KeepServiceAccountTokenReferences(current, desired runtime.Object) error + func MatchImmutableErrorMessages(errorMessage string) bool + func MatchImmutableNoStatefulSet(errorMessage string) bool + func ServiceIPModifier(current, desired runtime.Object) error + type CombinedResult struct + Err error + Result reconcile.Result + func (c *CombinedResult) Combine(sub *reconcile.Result, err error) + func (c *CombinedResult) CombineErr(err error) + type ComponentLifecycle interface + OnFinished func(object runtime.Object) error + type ComponentReconciler interface + Reconcile func(object runtime.Object) (*reconcile.Result, error) + RegisterWatches func(*builder.Builder) + type ComponentReconcilers []ComponentReconciler + func (c ComponentReconcilers) Get(order utils.ResourceOrder) []ComponentReconciler + type ComponentWithStatus interface + IsEnabled func(object runtime.Object) bool + IsSkipped func(object runtime.Object) bool + Update func(object runtime.Object, status types.ReconcileStatus, msg string) error + type ConditionChecker struct + func NewConditionChecker(client client.Client, scheme *runtime.Scheme, log logr.Logger) *ConditionChecker + func (c *ConditionChecker) CheckResourceConditions(conditions []ResourceCondition, backoff *wait.Backoff) error + type ConditionType string + type DefaultReconciledComponent struct + func (d *DefaultReconciledComponent) PurgeTypes() []schema.GroupVersionKind + func (d *DefaultReconciledComponent) RegisterWatches(b *builder.Builder) + func (d *DefaultReconciledComponent) ResourceBuilders(parent ResourceOwner, object interface{}) []ResourceBuilder + type DesiredState interface + BeforeCreate func(desired runtime.Object) error + BeforeDelete func(current runtime.Object) error + BeforeUpdate func(current, desired runtime.Object) error + type DesiredStateHook func(object runtime.Object) error + func (d DesiredStateHook) BeforeCreate(desired runtime.Object) error + func (d DesiredStateHook) BeforeDelete(current runtime.Object) error + func (d DesiredStateHook) BeforeUpdate(current, desired runtime.Object) error + type DesiredStateShouldCreate interface + ShouldCreate func(desired runtime.Object) (bool, error) + type DesiredStateShouldDelete interface + ShouldDelete func(desired runtime.Object) (bool, error) + type DesiredStateShouldUpdate interface + ShouldUpdate func(current, desired runtime.Object) (bool, error) + type DesiredStateWithCreateOptions interface + GetCreateOptions func() []client.CreateOption + type DesiredStateWithDeleteOptions interface + GetDeleteOptions func() []client.DeleteOption + type DesiredStateWithGetter interface + GetDesiredState func() DesiredState + type DesiredStateWithStaticState interface + DesiredState func() StaticDesiredState + type DesiredStateWithUpdateOptions interface + GetUpdateOptions func() []client.UpdateOption + type Dispatcher struct + CompletionHandler func(runtime.Object, ctrl.Result, error) (ctrl.Result, error) + ComponentReconcilers ComponentReconcilers + ForceResourceOrder utils.ResourceOrder + Log logr.Logger + ResourceFilter func(runtime.Object) (bool, error) + ResourceGetter func(req ctrl.Request) (runtime.Object, error) + func (r *Dispatcher) Handle(object runtime.Object) (ctrl.Result, error) + func (r *Dispatcher) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error) + func (r *Dispatcher) RegisterWatches(b *builder.Builder) *builder.Builder + func (r *Dispatcher) SetupAdditionalWatches(c controller.Controller) error + type DynamicDesiredState struct + BeforeCreateFunc func(desired runtime.Object) error + BeforeDeleteFunc func(current runtime.Object) error + BeforeUpdateFunc func(current, desired runtime.Object) error + CreateOptions []runtimeClient.CreateOption + DeleteOptions []runtimeClient.DeleteOption + DesiredState DesiredState + ShouldCreateFunc func(desired runtime.Object) (bool, error) + ShouldDeleteFunc func(desired runtime.Object) (bool, error) + ShouldUpdateFunc func(current, desired runtime.Object) (bool, error) + UpdateOptions []runtimeClient.UpdateOption + func (s DynamicDesiredState) BeforeCreate(desired runtime.Object) error + func (s DynamicDesiredState) BeforeDelete(current runtime.Object) error + func (s DynamicDesiredState) BeforeUpdate(current, desired runtime.Object) error + func (s DynamicDesiredState) GetCreateptions() []runtimeClient.CreateOption + func (s DynamicDesiredState) GetDeleteOptions() []runtimeClient.DeleteOption + func (s DynamicDesiredState) GetDesiredState() DesiredState + func (s DynamicDesiredState) GetUpdateOptions() []runtimeClient.UpdateOption + func (s DynamicDesiredState) ShouldCreate(desired runtime.Object) (bool, error) + func (s DynamicDesiredState) ShouldDelete(desired runtime.Object) (bool, error) + func (s DynamicDesiredState) ShouldUpdate(current, desired runtime.Object) (bool, error) + type ErrorMessageCondition func(string) bool + type GenericResourceReconciler struct + Client client.Client + Log logr.Logger + Options ReconcilerOpts + func NewGenericReconciler(c client.Client, log logr.Logger, opts ReconcilerOpts) *GenericResourceReconciler + func (r *GenericResourceReconciler) CreateIfNotExist(desired runtime.Object, desiredState DesiredState) (bool, runtime.Object, error) + func (r *GenericResourceReconciler) CreateResource(desired runtime.Object) error + func (r *GenericResourceReconciler) ReconcileResource(desired runtime.Object, desiredState DesiredState) (*reconcile.Result, error) + type MultipleDesiredStates []DesiredState + func (s MultipleDesiredStates) BeforeCreate(desired runtime.Object) error + func (s MultipleDesiredStates) BeforeDelete(desired runtime.Object) error + func (s MultipleDesiredStates) BeforeUpdate(current, desired runtime.Object) error + func (s MultipleDesiredStates) GetCreateptions() []runtimeClient.CreateOption + func (s MultipleDesiredStates) GetDeleteOptions() []runtimeClient.DeleteOption + func (s MultipleDesiredStates) GetDesiredState() DesiredState + func (s MultipleDesiredStates) GetUpdateOptions() []runtimeClient.UpdateOption + func (s MultipleDesiredStates) ShouldCreate(desired runtime.Object) (bool, error) + func (s MultipleDesiredStates) ShouldDelete(desired runtime.Object) (bool, error) + func (s MultipleDesiredStates) ShouldUpdate(current, desired runtime.Object) (bool, error) + type NativeReconciledComponent interface + PurgeTypes func() []schema.GroupVersionKind + RegisterWatches func(*builder.Builder) + ResourceBuilders func(parent ResourceOwner, object interface{}) []ResourceBuilder + func NewReconciledComponent(b ResourceBuilders, w func(b *builder.Builder), ...) NativeReconciledComponent + type NativeReconciler struct + func NewNativeReconciler(componentName string, rec *GenericResourceReconciler, client client.Client, ...) *NativeReconciler + func NewNativeReconcilerWithDefaults(component string, client client.Client, scheme *runtime.Scheme, ...) *NativeReconciler + func (rec *NativeReconciler) GetReconciledObjectWithState(state reconciledObjectState) []runtime.Object + func (rec *NativeReconciler) Reconcile(owner runtime.Object) (*reconcile.Result, error) + func (rec *NativeReconciler) RegisterWatches(b *builder.Builder) + type NativeReconcilerOpt func(*NativeReconciler) + func NativeReconcilerSetControllerRef() NativeReconcilerOpt + func NativeReconcilerSetRESTMapper(mapper meta.RESTMapper) NativeReconcilerOpt + func NativeReconcilerWithModifier(modifierFunc resources.ObjectModifierWithParentFunc) NativeReconcilerOpt + func NativeReconcilerWithRetriableErrorFunc(retriableErrorFunc func(error) bool) NativeReconcilerOpt + func NativeReconcilerWithRetryBackoff(backoff wait.Backoff) NativeReconcilerOpt + func NativeReconcilerWithScheme(scheme *runtime.Scheme) NativeReconcilerOpt + func NativeReconcilerWithWait(backoff *wait.Backoff) NativeReconcilerOpt + type ObjectKeyWithGVK struct + GVK schema.GroupVersionKind + ObjectKey client.ObjectKey + type PendingStatusPredicate struct + func (PendingStatusPredicate) Update(e event.UpdateEvent) bool + type PurgeTypesFunc func() []schema.GroupVersionKind + type ReconcileRetry struct + DefaultWait time.Duration + MaxRetries int + func (r *ReconcileRetry) Reconcile(component func() (*reconcile.Result, error)) error + type ReconcilerOpts struct + EnableRecreateWorkloadOnImmutableFieldChange bool + EnableRecreateWorkloadOnImmutableFieldChangeHelp string + Log logr.Logger + PatchCalculateOptions []patch.CalculateOption + PatchMaker patch.Maker + RecreateEnabledResourceCondition RecreateResourceCondition + RecreateErrorMessageCondition ErrorMessageCondition + RecreateErrorMessageSubstring *string + RecreateImmediately bool + RecreatePropagationPolicy client.PropagationPolicy + RecreateRequeueDelay *int32 + Scheme *runtime.Scheme + type RecreateResourceCondition func(kind schema.GroupVersionKind, status metav1.Status) bool + type ResourceBuilder func() (runtime.Object, DesiredState, error) + func GetResourceBuildersFromObjects(objects []runtime.Object, state DesiredState, ...) ([]ResourceBuilder, error) + type ResourceBuilders func(parent ResourceOwner, object interface{}) []ResourceBuilder + type ResourceCondition struct + Checks []wait.ResourceConditionCheck + CustomChecks []wait.CustomResourceConditionCheck + Description string + ID string + Object *ObjectKeyWithGVK + type ResourceOwner interface + type ResourceOwnerWithControlNamespace interface + GetControlNamespace func() string + type ResourceReconciler interface + CreateIfNotExist func(runtime.Object, DesiredState) (created bool, object runtime.Object, err error) + ReconcileResource func(runtime.Object, DesiredState) (*reconcile.Result, error) + func NewReconcilerWith(client client.Client, opts ...ResourceReconcilerOption) ResourceReconciler + type ResourceReconcilerOption func(*ReconcilerOpts) + func WithEnableRecreateWorkload() ResourceReconcilerOption + func WithLog(log logr.Logger) ResourceReconcilerOption + func WithPatchCalculateOptions(options ...patch.CalculateOption) ResourceReconcilerOption + func WithPatchMaker(maker patch.Maker) ResourceReconcilerOption + func WithRecreateEnabledFor(condition RecreateResourceCondition) ResourceReconcilerOption + func WithRecreateEnabledForAll() ResourceReconcilerOption + func WithRecreateEnabledForNothing() ResourceReconcilerOption + func WithRecreateErrorMessageCondition(condition ErrorMessageCondition) ResourceReconcilerOption + func WithRecreateErrorMessageIgnored() ResourceReconcilerOption + func WithRecreateErrorMessageSubstring(substring string) ResourceReconcilerOption + func WithRecreateImmediately() ResourceReconcilerOption + func WithRecreateRequeueDelay(delay int32) ResourceReconcilerOption + func WithScheme(scheme *runtime.Scheme) ResourceReconcilerOption + type ResourceTranslate func(runtime.Object) (parent ResourceOwner, config interface{}) + type SkipCreatePredicate struct + func (SkipCreatePredicate) Create(e event.CreateEvent) bool + type SkipDeletePredicate struct + func (SkipDeletePredicate) Delete(e event.DeleteEvent) bool + type SkipUpdatePredicate struct + func (SkipUpdatePredicate) Update(e event.UpdateEvent) bool + type SpecChangePredicate struct + func (p SpecChangePredicate) Update(e event.UpdateEvent) bool + type StaticDesiredState string + func (s StaticDesiredState) BeforeCreate(desired runtime.Object) error + func (s StaticDesiredState) BeforeDelete(current runtime.Object) error + func (s StaticDesiredState) BeforeUpdate(current, desired runtime.Object) error + type Watches interface + SetupAdditionalWatches func(c controller.Controller) error