Documentation ¶
Index ¶
- func NewSyncer(ctx context.Context, options ...SyncerOption) (kubestate.Syncer, error)
- func ReconcilerFromLegacySyncHandler(sync queueinformer.LegacySyncHandler, onDelete func(obj interface{})) kubestate.Reconciler
- type CatalogHealthKnownState
- type CatalogHealthState
- type CatalogHealthyState
- type CatalogUnhealthyState
- type InstallPlanFailedState
- type InstallPlanInstalledState
- type InstallPlanKnownState
- type InstallPlanMissingState
- type InstallPlanPendingState
- type InstallPlanReferencedState
- type InstallPlanState
- type NoInstallPlanReferencedState
- type SubscriptionAddedState
- type SubscriptionDeletedState
- type SubscriptionExistsState
- type SubscriptionState
- type SubscriptionUpdatedState
- type SyncerOption
- func WithAppendedReconcilers(reconcilers ...kubestate.Reconciler) SyncerOption
- func WithCatalogInformer(catalogInformer cache.SharedIndexInformer) SyncerOption
- func WithClient(client versioned.Interface) SyncerOption
- func WithClock(clock utilclock.Clock) SyncerOption
- func WithGlobalCatalogNamespace(namespace string) SyncerOption
- func WithInstallPlanInformer(installPlanInformer cache.SharedIndexInformer) SyncerOption
- func WithLogger(logger *logrus.Logger) SyncerOption
- func WithOperatorLister(lister operatorlister.OperatorLister) SyncerOption
- func WithRegistryReconcilerFactory(r reconciler.RegistryReconcilerFactory) SyncerOption
- func WithSubscriptionInformer(subscriptionInformer cache.SharedIndexInformer) SyncerOption
- func WithSubscriptionQueue(subscriptionQueue workqueue.RateLimitingInterface) SyncerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReconcilerFromLegacySyncHandler ¶
func ReconcilerFromLegacySyncHandler(sync queueinformer.LegacySyncHandler, onDelete func(obj interface{})) kubestate.Reconciler
ReconcilerFromLegacySyncHandler returns a reconciler that invokes the given legacy sync handler and on delete funcs. Since the reconciler does not return an updated kubestate, it MUST be the last reconciler in a given chain.
Types ¶
type CatalogHealthKnownState ¶
type CatalogHealthKnownState interface { CatalogHealthState // contains filtered or unexported methods }
CatalogHealthKnownState describes subscription states in which all relevant catalog health is known.
type CatalogHealthState ¶
type CatalogHealthState interface { SubscriptionExistsState // UpdateHealth transitions the CatalogHealthState to another CatalogHealthState based on the given subscription catalog health. // The state's underlying subscription may be updated on the cluster. If the subscription is updated, the resulting state will contain the updated version. UpdateHealth(now *metav1.Time, client clientv1alpha1.SubscriptionInterface, health ...v1alpha1.SubscriptionCatalogHealth) (CatalogHealthState, error) // contains filtered or unexported methods }
CatalogHealthState describes subscription states that represent a subscription with respect to catalog health.
func NewCatalogHealthState ¶
func NewCatalogHealthState(s SubscriptionExistsState) CatalogHealthState
type CatalogHealthyState ¶
type CatalogHealthyState interface { CatalogHealthKnownState // contains filtered or unexported methods }
CatalogHealthyState describes subscription states in which all relevant catalogs are known to be healthy.
type CatalogUnhealthyState ¶
type CatalogUnhealthyState interface { CatalogHealthKnownState // contains filtered or unexported methods }
CatalogUnhealthyState describes subscription states in which at least one relevant catalog is known to be unhealthy.
type InstallPlanFailedState ¶
type InstallPlanFailedState interface { InstallPlanKnownState // contains filtered or unexported methods }
type InstallPlanInstalledState ¶
type InstallPlanInstalledState interface { InstallPlanKnownState // contains filtered or unexported methods }
type InstallPlanKnownState ¶
type InstallPlanKnownState interface { InstallPlanReferencedState // contains filtered or unexported methods }
type InstallPlanMissingState ¶
type InstallPlanMissingState interface { InstallPlanKnownState // contains filtered or unexported methods }
type InstallPlanPendingState ¶
type InstallPlanPendingState interface { InstallPlanKnownState // contains filtered or unexported methods }
type InstallPlanReferencedState ¶
type InstallPlanReferencedState interface { InstallPlanState InstallPlanNotFound(now *metav1.Time, client clientv1alpha1.SubscriptionInterface) (InstallPlanReferencedState, error) CheckInstallPlanStatus(now *metav1.Time, client clientv1alpha1.SubscriptionInterface, status *v1alpha1.InstallPlanStatus) (InstallPlanReferencedState, error) // contains filtered or unexported methods }
type InstallPlanState ¶
type InstallPlanState interface { SubscriptionExistsState CheckReference() InstallPlanState // contains filtered or unexported methods }
InstallPlanState describes Subscription states with respect to an InstallPlan.
type NoInstallPlanReferencedState ¶
type NoInstallPlanReferencedState interface { InstallPlanState // contains filtered or unexported methods }
type SubscriptionAddedState ¶
type SubscriptionAddedState interface { SubscriptionExistsState // contains filtered or unexported methods }
SubscriptionAddedState describes subscription states in which the subscription was added to cluster.
type SubscriptionDeletedState ¶
type SubscriptionDeletedState interface { SubscriptionState // contains filtered or unexported methods }
SubscriptionDeletedState describes subscription states in which the subscription no longer exists and was deleted from the cluster.
type SubscriptionExistsState ¶
type SubscriptionExistsState interface { SubscriptionState // contains filtered or unexported methods }
SubscriptionExistsState describes subscription states in which the subscription exists on the cluster.
type SubscriptionState ¶
type SubscriptionState interface { kubestate.State Subscription() *v1alpha1.Subscription Add() SubscriptionExistsState Update() SubscriptionExistsState Delete() SubscriptionDeletedState // contains filtered or unexported methods }
SubscriptionState describes subscription states.
func NewSubscriptionState ¶
func NewSubscriptionState(sub *v1alpha1.Subscription) SubscriptionState
type SubscriptionUpdatedState ¶
type SubscriptionUpdatedState interface { SubscriptionExistsState // contains filtered or unexported methods }
SubscriptionUpdatedState describes subscription states in which the subscription was updated in the cluster.
type SyncerOption ¶
type SyncerOption func(*syncerConfig)
SyncerOption is a configuration option for a subscription syncer.
func WithAppendedReconcilers ¶
func WithAppendedReconcilers(reconcilers ...kubestate.Reconciler) SyncerOption
WithAppendedReconcilers adds the given reconcilers to the end of a syncer's reconciler chain, to be invoked after its default reconcilers have been called.
func WithCatalogInformer ¶
func WithCatalogInformer(catalogInformer cache.SharedIndexInformer) SyncerOption
WithCatalogInformer sets a CatalogSource informer to act as an event source for dependent Subscriptions.
func WithClient ¶
func WithClient(client versioned.Interface) SyncerOption
WithClient sets a syncer's OLM client.
func WithClock ¶
func WithClock(clock utilclock.Clock) SyncerOption
WithClock sets a syncer's clock.
func WithGlobalCatalogNamespace ¶
func WithGlobalCatalogNamespace(namespace string) SyncerOption
WithGlobalCatalogNamespace sets a syncer's global catalog namespace.
func WithInstallPlanInformer ¶
func WithInstallPlanInformer(installPlanInformer cache.SharedIndexInformer) SyncerOption
WithInstallPlanInformer sets an InstallPlan informer to act as an event source for dependent Subscriptions.
func WithLogger ¶
func WithLogger(logger *logrus.Logger) SyncerOption
WithLogger sets a syncer's logger.
func WithOperatorLister ¶
func WithOperatorLister(lister operatorlister.OperatorLister) SyncerOption
WithOperatorLister sets a syncer's operator lister.
func WithRegistryReconcilerFactory ¶
func WithRegistryReconcilerFactory(r reconciler.RegistryReconcilerFactory) SyncerOption
WithRegistryReconcilerFactory sets a syncer's registry reconciler factory.
func WithSubscriptionInformer ¶
func WithSubscriptionInformer(subscriptionInformer cache.SharedIndexInformer) SyncerOption
WithSubscriptionInformer sets the informer a syncer will extract its subscription indexer from.
func WithSubscriptionQueue ¶
func WithSubscriptionQueue(subscriptionQueue workqueue.RateLimitingInterface) SyncerOption
WithSubscriptionQueue sets a syncer's subscription queue.