Documentation ¶
Index ¶
- Constants
- Variables
- 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 ServiceIPModifier(current, desired runtime.Object) error
- type CombinedResult
- type ComponentLifecycle
- type ComponentReconciler
- type ComponentReconcilers
- type ComponentWithStatus
- type ConditionChecker
- type ConditionType
- type DefaultReconciledComponent
- type DesiredState
- type DesiredStateHook
- type DesiredStateShouldCreate
- type DesiredStateShouldDelete
- type DesiredStateShouldUpdate
- type DesiredStateWithCreateOptions
- type DesiredStateWithDeleteOptions
- type DesiredStateWithGetter
- type DesiredStateWithStaticState
- type DesiredStateWithUpdateOptions
- type Dispatcher
- 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
- 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
- type 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
- 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
- type NativeReconciler
- type NativeReconcilerOpt
- func NativeReconcilerSetControllerRef() NativeReconcilerOpt
- func NativeReconcilerSetRESTMapper(mapper meta.RESTMapper) NativeReconcilerOpt
- func NativeReconcilerWithModifier(modifierFunc resources.ObjectModifierWithParentFunc) NativeReconcilerOpt
- func NativeReconcilerWithScheme(scheme *runtime.Scheme) NativeReconcilerOpt
- func NativeReconcilerWithWait(backoff *wait.Backoff) NativeReconcilerOpt
- type ObjectKeyWithGVK
- type PendingStatusPredicate
- type PurgeTypesFunc
- type ReconcileRetry
- type ReconcilerOpts
- type RecreateResourceCondition
- type ResourceBuilder
- type ResourceBuilders
- type ResourceCondition
- type ResourceOwner
- type ResourceOwnerWithControlNamespace
- type ResourceReconciler
- type ResourceReconcilerOption
- func WithEnableRecreateWorkload() ResourceReconcilerOption
- func WithLog(log logr.Logger) 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
- type SkipCreatePredicate
- type SkipDeletePredicate
- type SkipUpdatePredicate
- type SpecChangePredicate
- type StaticDesiredState
- type Watches
Constants ¶
const ( ReconciledObjectStateAbsent reconciledObjectState = "Absent" ReconciledObjectStatePresent reconciledObjectState = "Present" ReconciledObjectStatePurged reconciledObjectState = "Purged" )
const ( DefaultRecreateRequeueDelay int32 = 10 StateCreated StaticDesiredState = "Created" StateAbsent StaticDesiredState = "Absent" StatePresent StaticDesiredState = "Present" )
Variables ¶
var DefaultBackoff = wait.Backoff{ Duration: time.Second * 5, Factor: 1, Jitter: 0, Steps: 12, }
var DefaultRecreateEnabledGroupKinds = []schema.GroupKind{
{Group: "", Kind: "Service"},
{Group: "apps", Kind: "StatefulSet"},
{Group: "apps", Kind: "DaemonSet"},
{Group: "apps", Kind: "Deployment"},
}
Functions ¶
func EnqueueByOwnerAnnotationMapper ¶ added in v0.11.0
func IgnoreManagedFields ¶ added in v0.12.0
func IgnoreManagedFields() patch.CalculateOption
func IstioSidecarInjectorExistsCheck ¶ added in v0.12.0
func IstioSidecarInjectorExistsCheck(c client.Client, namespace string) wait.CustomResourceConditionCheck
func KeepLabelsAndAnnotationsModifer ¶ added in v0.22.0
func KeepServiceAccountTokenReferences ¶ added in v0.22.0
func MatchImmutableErrorMessages ¶ added in v0.26.0
func ServiceIPModifier ¶ added in v0.22.0
Types ¶
type CombinedResult ¶ added in v0.7.0
Collects results and errors of all subcomponents instead of failing and bailing out immediately
func (*CombinedResult) Combine ¶ added in v0.7.0
func (c *CombinedResult) Combine(sub *reconcile.Result, err error)
func (*CombinedResult) CombineErr ¶ added in v0.7.0
func (c *CombinedResult) CombineErr(err error)
type ComponentLifecycle ¶ added in v0.14.0
type ComponentReconciler ¶ added in v0.7.0
type ComponentReconcilers ¶ added in v0.25.1
type ComponentReconcilers []ComponentReconciler
ComponentReconcilers is a list of component reconcilers that support getting components in Install and Uninstall order.
func (ComponentReconcilers) Get ¶ added in v0.25.1
func (c ComponentReconcilers) Get(order utils.ResourceOrder) []ComponentReconciler
type ComponentWithStatus ¶ added in v0.14.0
type ConditionChecker ¶ added in v0.12.0
type ConditionChecker struct {
// contains filtered or unexported fields
}
func NewConditionChecker ¶ added in v0.12.0
func (*ConditionChecker) CheckResourceConditions ¶ added in v0.12.0
func (c *ConditionChecker) CheckResourceConditions(conditions []ResourceCondition, backoff *wait.Backoff) error
type ConditionType ¶ added in v0.12.0
type ConditionType string
type DefaultReconciledComponent ¶ added in v0.7.0
type DefaultReconciledComponent struct {
// contains filtered or unexported fields
}
func (*DefaultReconciledComponent) PurgeTypes ¶ added in v0.7.0
func (d *DefaultReconciledComponent) PurgeTypes() []schema.GroupVersionKind
func (*DefaultReconciledComponent) RegisterWatches ¶ added in v0.7.0
func (d *DefaultReconciledComponent) RegisterWatches(b *builder.Builder)
func (*DefaultReconciledComponent) ResourceBuilders ¶ added in v0.7.0
func (d *DefaultReconciledComponent) ResourceBuilders(parent ResourceOwner, object interface{}) []ResourceBuilder
type DesiredState ¶
type DesiredStateHook ¶
func (DesiredStateHook) BeforeCreate ¶ added in v0.11.0
func (d DesiredStateHook) BeforeCreate(desired runtime.Object) error
func (DesiredStateHook) BeforeDelete ¶ added in v0.11.0
func (d DesiredStateHook) BeforeDelete(current runtime.Object) error
func (DesiredStateHook) BeforeUpdate ¶
func (d DesiredStateHook) BeforeUpdate(current, desired runtime.Object) error
type DesiredStateShouldCreate ¶ added in v0.11.0
type DesiredStateShouldDelete ¶ added in v0.11.0
type DesiredStateShouldUpdate ¶ added in v0.11.0
type DesiredStateWithCreateOptions ¶ added in v0.11.0
type DesiredStateWithCreateOptions interface {
GetCreateOptions() []client.CreateOption
}
type DesiredStateWithDeleteOptions ¶ added in v0.11.0
type DesiredStateWithDeleteOptions interface {
GetDeleteOptions() []client.DeleteOption
}
type DesiredStateWithGetter ¶ added in v0.26.1
type DesiredStateWithGetter interface {
GetDesiredState() DesiredState
}
type DesiredStateWithStaticState ¶ added in v0.11.0
type DesiredStateWithStaticState interface {
DesiredState() StaticDesiredState
}
type DesiredStateWithUpdateOptions ¶ added in v0.11.0
type DesiredStateWithUpdateOptions interface {
GetUpdateOptions() []client.UpdateOption
}
type Dispatcher ¶ added in v0.7.0
type Dispatcher struct { client.Client Log logr.Logger ResourceGetter func(req ctrl.Request) (runtime.Object, error) ResourceFilter func(runtime.Object) (bool, error) CompletionHandler func(runtime.Object, ctrl.Result, error) (ctrl.Result, error) ComponentReconcilers ComponentReconcilers // ForceResourceOrder can be used to force a given resource ordering regardless of an object being deleted with // finalizers. ForceResourceOrder utils.ResourceOrder }
Dispatcher orchestrates reconciliation of multiple ComponentReconciler objects focusing on handing off reconciled object to all of its components and calculating an aggregated result to return. It requires a ResourceGetter callback and optionally can leverage a ResourceFilter and a CompletionHandler
func (*Dispatcher) Handle ¶ added in v0.7.0
Handle receives a single object and dispatches it to all the components Components need to understand how to interpret the object
func (*Dispatcher) Reconcile ¶ added in v0.7.0
Reconcile implements reconcile.Reconciler in a generic way from the controller-runtime library
func (*Dispatcher) RegisterWatches ¶ added in v0.7.0
func (r *Dispatcher) RegisterWatches(b *builder.Builder) *builder.Builder
RegisterWatches dispatches the watch registration builder to all its components
func (*Dispatcher) SetupAdditionalWatches ¶ added in v0.11.0
func (r *Dispatcher) SetupAdditionalWatches(c controller.Controller) error
SetupAdditionalWatches dispatches the controller for watch registration to all its components
type DynamicDesiredState ¶ added in v0.22.0
type DynamicDesiredState struct { DesiredState DesiredState BeforeCreateFunc func(desired runtime.Object) error BeforeUpdateFunc func(current, desired runtime.Object) error BeforeDeleteFunc func(current runtime.Object) error CreateOptions []runtimeClient.CreateOption UpdateOptions []runtimeClient.UpdateOption DeleteOptions []runtimeClient.DeleteOption ShouldCreateFunc func(desired runtime.Object) (bool, error) ShouldUpdateFunc func(current, desired runtime.Object) (bool, error) ShouldDeleteFunc func(desired runtime.Object) (bool, error) }
func (DynamicDesiredState) BeforeCreate ¶ added in v0.22.0
func (s DynamicDesiredState) BeforeCreate(desired runtime.Object) error
func (DynamicDesiredState) BeforeDelete ¶ added in v0.22.0
func (s DynamicDesiredState) BeforeDelete(current runtime.Object) error
func (DynamicDesiredState) BeforeUpdate ¶ added in v0.22.0
func (s DynamicDesiredState) BeforeUpdate(current, desired runtime.Object) error
func (DynamicDesiredState) GetCreateptions ¶ added in v0.22.0
func (s DynamicDesiredState) GetCreateptions() []runtimeClient.CreateOption
func (DynamicDesiredState) GetDeleteOptions ¶ added in v0.22.0
func (s DynamicDesiredState) GetDeleteOptions() []runtimeClient.DeleteOption
func (DynamicDesiredState) GetDesiredState ¶ added in v0.22.0
func (s DynamicDesiredState) GetDesiredState() DesiredState
func (DynamicDesiredState) GetUpdateOptions ¶ added in v0.22.0
func (s DynamicDesiredState) GetUpdateOptions() []runtimeClient.UpdateOption
func (DynamicDesiredState) ShouldCreate ¶ added in v0.22.0
func (s DynamicDesiredState) ShouldCreate(desired runtime.Object) (bool, error)
func (DynamicDesiredState) ShouldDelete ¶ added in v0.22.0
func (s DynamicDesiredState) ShouldDelete(desired runtime.Object) (bool, error)
func (DynamicDesiredState) ShouldUpdate ¶ added in v0.22.0
func (s DynamicDesiredState) ShouldUpdate(current, desired runtime.Object) (bool, error)
type ErrorMessageCondition ¶ added in v0.26.0
type GenericResourceReconciler ¶
type GenericResourceReconciler struct { Log logr.Logger Client client.Client Options ReconcilerOpts }
GenericResourceReconciler generic resource reconciler
func NewGenericReconciler ¶ added in v0.12.0
func NewGenericReconciler(c client.Client, log logr.Logger, opts ReconcilerOpts) *GenericResourceReconciler
NewGenericReconciler returns GenericResourceReconciler Deprecated, use NewReconcilerWith
func (*GenericResourceReconciler) CreateIfNotExist ¶ added in v0.7.0
func (r *GenericResourceReconciler) CreateIfNotExist(desired runtime.Object, desiredState DesiredState) (bool, runtime.Object, error)
func (*GenericResourceReconciler) CreateResource ¶
func (r *GenericResourceReconciler) CreateResource(desired runtime.Object) error
CreateResource creates a resource if it doesn't exist
func (*GenericResourceReconciler) ReconcileResource ¶
func (r *GenericResourceReconciler) ReconcileResource(desired runtime.Object, desiredState DesiredState) (*reconcile.Result, error)
ReconcileResource reconciles various kubernetes types
type MultipleDesiredStates ¶ added in v0.26.1
type MultipleDesiredStates []DesiredState
func (MultipleDesiredStates) BeforeCreate ¶ added in v0.26.1
func (s MultipleDesiredStates) BeforeCreate(desired runtime.Object) error
func (MultipleDesiredStates) BeforeDelete ¶ added in v0.26.1
func (s MultipleDesiredStates) BeforeDelete(desired runtime.Object) error
func (MultipleDesiredStates) BeforeUpdate ¶ added in v0.26.1
func (s MultipleDesiredStates) BeforeUpdate(current, desired runtime.Object) error
func (MultipleDesiredStates) GetCreateptions ¶ added in v0.26.1
func (s MultipleDesiredStates) GetCreateptions() []runtimeClient.CreateOption
func (MultipleDesiredStates) GetDeleteOptions ¶ added in v0.26.1
func (s MultipleDesiredStates) GetDeleteOptions() []runtimeClient.DeleteOption
func (MultipleDesiredStates) GetDesiredState ¶ added in v0.26.1
func (s MultipleDesiredStates) GetDesiredState() DesiredState
func (MultipleDesiredStates) GetUpdateOptions ¶ added in v0.26.1
func (s MultipleDesiredStates) GetUpdateOptions() []runtimeClient.UpdateOption
func (MultipleDesiredStates) ShouldCreate ¶ added in v0.26.1
func (s MultipleDesiredStates) ShouldCreate(desired runtime.Object) (bool, error)
func (MultipleDesiredStates) ShouldDelete ¶ added in v0.26.1
func (s MultipleDesiredStates) ShouldDelete(desired runtime.Object) (bool, error)
func (MultipleDesiredStates) ShouldUpdate ¶ added in v0.26.1
func (s MultipleDesiredStates) ShouldUpdate(current, desired runtime.Object) (bool, error)
type NativeReconciledComponent ¶ added in v0.7.0
type NativeReconciledComponent interface { ResourceBuilders(parent ResourceOwner, object interface{}) []ResourceBuilder RegisterWatches(*builder.Builder) PurgeTypes() []schema.GroupVersionKind }
func NewReconciledComponent ¶ added in v0.7.0
func NewReconciledComponent(b ResourceBuilders, w func(b *builder.Builder), p func() []schema.GroupVersionKind) NativeReconciledComponent
type NativeReconciler ¶ added in v0.7.0
type NativeReconciler struct { *GenericResourceReconciler client.Client // contains filtered or unexported fields }
func NewNativeReconciler ¶ added in v0.7.0
func NewNativeReconciler( componentName string, rec *GenericResourceReconciler, client client.Client, reconciledComponent NativeReconciledComponent, resourceTranslate func(runtime.Object) (parent ResourceOwner, config interface{}), opts ...NativeReconcilerOpt) *NativeReconciler
func NewNativeReconcilerWithDefaults ¶ added in v0.12.0
func NewNativeReconcilerWithDefaults( component string, client client.Client, scheme *runtime.Scheme, logger logr.Logger, resourceBuilders ResourceBuilders, purgeTypes PurgeTypesFunc, resourceTranslate ResourceTranslate, opts ...NativeReconcilerOpt, ) *NativeReconciler
func (*NativeReconciler) GetReconciledObjectWithState ¶ added in v0.11.0
func (rec *NativeReconciler) GetReconciledObjectWithState(state reconciledObjectState) []runtime.Object
func (*NativeReconciler) RegisterWatches ¶ added in v0.7.0
func (rec *NativeReconciler) RegisterWatches(b *builder.Builder)
type NativeReconcilerOpt ¶ added in v0.7.0
type NativeReconcilerOpt func(*NativeReconciler)
func NativeReconcilerSetControllerRef ¶ added in v0.10.0
func NativeReconcilerSetControllerRef() NativeReconcilerOpt
func NativeReconcilerSetRESTMapper ¶ added in v0.11.0
func NativeReconcilerSetRESTMapper(mapper meta.RESTMapper) NativeReconcilerOpt
func NativeReconcilerWithModifier ¶ added in v0.21.2
func NativeReconcilerWithModifier(modifierFunc resources.ObjectModifierWithParentFunc) NativeReconcilerOpt
func NativeReconcilerWithScheme ¶ added in v0.7.0
func NativeReconcilerWithScheme(scheme *runtime.Scheme) NativeReconcilerOpt
func NativeReconcilerWithWait ¶ added in v0.12.0
func NativeReconcilerWithWait(backoff *wait.Backoff) NativeReconcilerOpt
type ObjectKeyWithGVK ¶ added in v0.12.0
type ObjectKeyWithGVK struct { ObjectKey client.ObjectKey `json:"objectKey,omitempty"` GVK schema.GroupVersionKind `json:"gvk,omitempty"` }
type PendingStatusPredicate ¶ added in v0.12.0
func (PendingStatusPredicate) Update ¶ added in v0.12.0
func (PendingStatusPredicate) Update(e event.UpdateEvent) bool
type PurgeTypesFunc ¶ added in v0.11.0
type PurgeTypesFunc func() []schema.GroupVersionKind
type ReconcileRetry ¶ added in v0.7.0
type ReconcilerOpts ¶
type ReconcilerOpts struct { Log logr.Logger Scheme *runtime.Scheme // Enable recreating workloads and services when the API server rejects an update EnableRecreateWorkloadOnImmutableFieldChange bool // Custom log message to help when a workload or service needs to be recreated EnableRecreateWorkloadOnImmutableFieldChangeHelp string // The delay in seconds to wait before checking back after deleting the resource (10s by default) RecreateRequeueDelay *int32 // List of callbacks evaluated to decide whether a given gvk is enabled to be recreated or not RecreateEnabledResourceCondition RecreateResourceCondition // Immediately recreate the resource instead of deleting and returning with a requeue RecreateImmediately bool // Configure the recreate PropagationPolicy. "Orphan" avoids deleting pods simultaneously. RecreatePropagationPolicy client.PropagationPolicy // Check the update error message contains this substring before recreate. Default: "immutable" RecreateErrorMessageSubstring *string // Custom logic to decide if an error message indicates a resource should be recreated. // Takes precedence over RecreateErrorMessageSubstring if set. RecreateErrorMessageCondition ErrorMessageCondition }
Recommended to use NewReconcilerWith + ResourceReconcilerOptions
type RecreateResourceCondition ¶ added in v0.21.0
type RecreateResourceCondition func(kind schema.GroupVersionKind, status metav1.Status) bool
type ResourceBuilder ¶ added in v0.7.0
type ResourceBuilder func() (runtime.Object, DesiredState, error)
func GetResourceBuildersFromObjects ¶ added in v0.12.0
func GetResourceBuildersFromObjects(objects []runtime.Object, state DesiredState, modifierFuncs ...resources.ObjectModifierFunc) ([]ResourceBuilder, error)
type ResourceBuilders ¶ added in v0.7.0
type ResourceBuilders func(parent ResourceOwner, object interface{}) []ResourceBuilder
type ResourceCondition ¶ added in v0.12.0
type ResourceCondition struct { ID string `json:"id,omitempty"` Description string `json:"shortDescription,omitempty"` Checks []wait.ResourceConditionCheck `json:"checks,omitempty"` CustomChecks []wait.CustomResourceConditionCheck `json:"customChecks,omitempty"` Object *ObjectKeyWithGVK `json:"object,omitempty"` }
type ResourceOwner ¶ added in v0.7.0
type ResourceOwnerWithControlNamespace ¶ added in v0.11.0
type ResourceOwnerWithControlNamespace interface { ResourceOwner // control namespace dictates where namespaced objects should belong to GetControlNamespace() string }
type ResourceReconciler ¶ added in v0.7.0
type ResourceReconciler interface { CreateIfNotExist(runtime.Object, DesiredState) (created bool, object runtime.Object, err error) ReconcileResource(runtime.Object, DesiredState) (*reconcile.Result, error) }
func NewReconcilerWith ¶ added in v0.7.0
func NewReconcilerWith(client client.Client, opts ...ResourceReconcilerOption) ResourceReconciler
type ResourceReconcilerOption ¶ added in v0.7.0
type ResourceReconcilerOption func(*ReconcilerOpts)
func WithEnableRecreateWorkload ¶ added in v0.7.0
func WithEnableRecreateWorkload() ResourceReconcilerOption
func WithLog ¶ added in v0.7.0
func WithLog(log logr.Logger) ResourceReconcilerOption
func WithRecreateEnabledFor ¶ added in v0.21.0
func WithRecreateEnabledFor(condition RecreateResourceCondition) ResourceReconcilerOption
Use this option for the legacy behaviour
func WithRecreateEnabledForAll ¶ added in v0.21.0
func WithRecreateEnabledForAll() ResourceReconcilerOption
Use this option for the legacy behaviour
func WithRecreateEnabledForNothing ¶ added in v0.21.0
func WithRecreateEnabledForNothing() ResourceReconcilerOption
Matches no GVK
func WithRecreateErrorMessageCondition ¶ added in v0.26.0
func WithRecreateErrorMessageCondition(condition ErrorMessageCondition) ResourceReconcilerOption
Recreate only if the error message contains the given substring
func WithRecreateErrorMessageIgnored ¶ added in v0.21.0
func WithRecreateErrorMessageIgnored() ResourceReconcilerOption
Disable checking the error message before recreating resources
func WithRecreateErrorMessageSubstring ¶ added in v0.21.0
func WithRecreateErrorMessageSubstring(substring string) ResourceReconcilerOption
Recreate only if the error message contains the given substring
func WithRecreateImmediately ¶ added in v0.21.0
func WithRecreateImmediately() ResourceReconcilerOption
Recreate workloads immediately without waiting for dependents to get GCd
func WithRecreateRequeueDelay ¶ added in v0.21.0
func WithRecreateRequeueDelay(delay int32) ResourceReconcilerOption
Apply the given amount of delay before recreating a resource after it has been removed
func WithScheme ¶ added in v0.7.0
func WithScheme(scheme *runtime.Scheme) ResourceReconcilerOption
type ResourceTranslate ¶ added in v0.11.0
type ResourceTranslate func(runtime.Object) (parent ResourceOwner, config interface{})
type SkipCreatePredicate ¶ added in v0.11.0
func (SkipCreatePredicate) Create ¶ added in v0.11.0
func (SkipCreatePredicate) Create(e event.CreateEvent) bool
type SkipDeletePredicate ¶ added in v0.11.0
func (SkipDeletePredicate) Delete ¶ added in v0.11.0
func (SkipDeletePredicate) Delete(e event.DeleteEvent) bool
type SkipUpdatePredicate ¶ added in v0.11.0
func (SkipUpdatePredicate) Update ¶ added in v0.11.0
func (SkipUpdatePredicate) Update(e event.UpdateEvent) bool
type SpecChangePredicate ¶ added in v0.12.0
func (SpecChangePredicate) Update ¶ added in v0.12.0
func (SpecChangePredicate) Update(e event.UpdateEvent) bool
type StaticDesiredState ¶
type StaticDesiredState string
func (StaticDesiredState) BeforeCreate ¶ added in v0.11.0
func (s StaticDesiredState) BeforeCreate(desired runtime.Object) error
func (StaticDesiredState) BeforeDelete ¶ added in v0.11.0
func (s StaticDesiredState) BeforeDelete(current runtime.Object) error
func (StaticDesiredState) BeforeUpdate ¶
func (s StaticDesiredState) BeforeUpdate(current, desired runtime.Object) error
type Watches ¶ added in v0.11.0
type Watches interface {
SetupAdditionalWatches(c controller.Controller) error
}