subscription

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSyncer

func NewSyncer(ctx context.Context, options ...SyncerOption) (kubestate.Syncer, error)

NewSyncer returns a syncer that syncs Subscription resources.

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. If the subscription is updated, a boolean value of 'true' will be
	// returned and the resulting state will contain the updated version.
	UpdateHealth(now *metav1.Time, health ...v1alpha1.SubscriptionCatalogHealth) (CatalogHealthState, bool)
	// contains filtered or unexported methods
}

CatalogHealthState describes subscription states that represent a subscription with respect to catalog health.

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 WithSourceProvider added in v0.27.0

func WithSourceProvider(provider resolverCache.SourceProvider) SyncerOption

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL