controllers

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterExtensionCleanupUnpackCacheFinalizer         = "olm.operatorframework.io/cleanup-unpack-cache"
	ClusterExtensionCleanupContentManagerCacheFinalizer = "olm.operatorframework.io/cleanup-contentmanager-cache"
)
View Source
const (
	ClusterExtensionRevisionOwnerLabel = "olm.operatorframework.io/owner"
)

Variables

This section is empty.

Functions

func SetDeprecationStatus

func SetDeprecationStatus(ext *ocv1.ClusterExtension, bundleName string, deprecation *declcfg.Deprecation)

SetDeprecationStatus will set the appropriate deprecation statuses for a ClusterExtension based on the provided bundle

func SetStatusCondition added in v1.5.1

func SetStatusCondition(conditions *[]metav1.Condition, condition metav1.Condition)

SetStatusCondition wraps apimeta.SetStatusCondition and ensures the message is always truncated This should be used throughout the codebase instead of apimeta.SetStatusCondition directly

Types

type Applier

type Applier interface {
	// Apply applies the content in the provided fs.FS using the configuration of the provided ClusterExtension.
	// It also takes in a map[string]string to be applied to all applied resources as labels and another
	// map[string]string used to create a unique identifier for a stored reference to the resources created.
	Apply(context.Context, fs.FS, *ocv1.ClusterExtension, map[string]string, map[string]string) (bool, string, error)
}

type BoxcutterRevisionStatesGetter added in v1.6.0

type BoxcutterRevisionStatesGetter struct {
	Reader client.Reader
}

func (*BoxcutterRevisionStatesGetter) GetRevisionStates added in v1.6.0

type CatalogCache

type CatalogCache interface {
	Get(catalogName, resolvedRef string) (fs.FS, error)
	Remove(catalogName string) error
}

type CatalogCachePopulator

type CatalogCachePopulator interface {
	PopulateCache(ctx context.Context, catalog *ocv1.ClusterCatalog) (fs.FS, error)
}

type ClusterCatalogReconciler

type ClusterCatalogReconciler struct {
	client.Client
	CatalogCache          CatalogCache
	CatalogCachePopulator CatalogCachePopulator
}

ClusterCatalogReconciler reconciles a ClusterCatalog object

func (*ClusterCatalogReconciler) Reconcile

func (*ClusterCatalogReconciler) SetupWithManager

func (r *ClusterCatalogReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ClusterExtensionReconciler

type ClusterExtensionReconciler struct {
	client.Client
	Resolver resolve.Resolver

	ImageCache  imageutil.Cache
	ImagePuller imageutil.Puller

	StorageMigrator      StorageMigrator
	Applier              Applier
	RevisionStatesGetter RevisionStatesGetter
	Finalizers           crfinalizer.Finalizers
}

ClusterExtensionReconciler reconciles a ClusterExtension object

func (*ClusterExtensionReconciler) Reconcile

The operator controller needs to watch all the bundle objects and reconcile accordingly. Though not ideal, but these permissions are required. This has been taken from rukpak, and an issue was created before to discuss it: https://github.com/operator-framework/rukpak/issues/800.

func (*ClusterExtensionReconciler) SetupWithManager

SetupWithManager sets up the controller with the Manager.

type ClusterExtensionRevisionReconciler added in v1.6.0

type ClusterExtensionRevisionReconciler struct {
	Client         client.Client
	RevisionEngine RevisionEngine
	TrackingCache  trackingCache
}

ClusterExtensionRevisionReconciler actions individual snapshots of ClusterExtensions, as part of the boxcutter integration.

func (*ClusterExtensionRevisionReconciler) Reconcile added in v1.6.0

func (*ClusterExtensionRevisionReconciler) SetupWithManager added in v1.6.0

func (c *ClusterExtensionRevisionReconciler) SetupWithManager(mgr ctrl.Manager) error

type ControllerBuilderOption added in v1.6.0

type ControllerBuilderOption func(builder *ctrl.Builder)

func WithOwns added in v1.6.0

type HelmRevisionStatesGetter added in v1.6.0

type HelmRevisionStatesGetter struct {
	helmclient.ActionClientGetter
}

func (*HelmRevisionStatesGetter) GetRevisionStates added in v1.6.0

type RevisionMetadata added in v1.6.0

type RevisionMetadata struct {
	Package string
	Image   string
	ocv1.BundleMetadata
}

type RevisionStates added in v1.6.0

type RevisionStates struct {
	Installed  *RevisionMetadata
	RollingOut []*RevisionMetadata
}

type RevisionStatesGetter added in v1.6.0

type RevisionStatesGetter interface {
	GetRevisionStates(ctx context.Context, ext *ocv1.ClusterExtension) (*RevisionStates, error)
}

type Sourcerer added in v1.6.0

type Sourcerer interface {
	Source(handler handler.EventHandler, predicates ...predicate.Predicate) source.Source
}

type StorageMigrator added in v1.6.0

type StorageMigrator interface {
	Migrate(context.Context, *ocv1.ClusterExtension, map[string]string) error
}

Jump to

Keyboard shortcuts

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