Documentation
¶
Index ¶
- Constants
- func SetDeprecationStatus(ext *ocv1.ClusterExtension, bundleName string, ...)
- func SetStatusCondition(conditions *[]metav1.Condition, condition metav1.Condition)
- type Applier
- type CatalogCache
- type CatalogCachePopulator
- type ClusterCatalogReconciler
- type ClusterExtensionReconciler
- type DefaultInstalledBundleGetter
- type InstalledBundle
- type InstalledBundleGetter
Constants ¶
const ( ClusterExtensionCleanupUnpackCacheFinalizer = "olm.operatorframework.io/cleanup-unpack-cache" ClusterExtensionCleanupContentManagerCacheFinalizer = "olm.operatorframework.io/cleanup-contentmanager-cache" )
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
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) ([]client.Object, string, error)
}
type CatalogCache ¶
type CatalogCachePopulator ¶
type ClusterCatalogReconciler ¶
type ClusterCatalogReconciler struct {
client.Client
CatalogCache CatalogCache
CatalogCachePopulator CatalogCachePopulator
}
ClusterCatalogReconciler reconciles a ClusterCatalog object
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
Applier Applier
Manager contentmanager.Manager
InstalledBundleGetter InstalledBundleGetter
Finalizers crfinalizer.Finalizers
// contains filtered or unexported fields
}
ClusterExtensionReconciler reconciles a ClusterExtension object
func (*ClusterExtensionReconciler) Reconcile ¶
func (r *ClusterExtensionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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 ¶
func (r *ClusterExtensionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DefaultInstalledBundleGetter ¶
type DefaultInstalledBundleGetter struct {
helmclient.ActionClientGetter
}
func (*DefaultInstalledBundleGetter) GetInstalledBundle ¶
func (d *DefaultInstalledBundleGetter) GetInstalledBundle(ctx context.Context, ext *ocv1.ClusterExtension) (*InstalledBundle, error)
type InstalledBundle ¶
type InstalledBundle struct {
ocv1.BundleMetadata
Image string
}
type InstalledBundleGetter ¶
type InstalledBundleGetter interface {
GetInstalledBundle(ctx context.Context, ext *ocv1.ClusterExtension) (*InstalledBundle, error)
}