Documentation ¶
Index ¶
- func SetDeprecationStatus(ext *ocv1alpha1.ClusterExtension, bundle *catalogmetadata.Bundle)
- func SuccessorsPredicate(packageName string, installedBundle *ocv1alpha1.BundleMetadata) (catalogfilter.Predicate[catalogmetadata.Bundle], error)
- type BundleProvider
- type ClusterExtensionReconciler
- type DefaultInstalledBundleGetter
- type InstalledBundleGetter
- type Preflight
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDeprecationStatus ¶ added in v0.10.0
func SetDeprecationStatus(ext *ocv1alpha1.ClusterExtension, bundle *catalogmetadata.Bundle)
SetDeprecationStatus will set the appropriate deprecation statuses for a ClusterExtension based on the provided bundle
func SuccessorsPredicate ¶ added in v0.10.0
func SuccessorsPredicate(packageName string, installedBundle *ocv1alpha1.BundleMetadata) (catalogfilter.Predicate[catalogmetadata.Bundle], error)
Types ¶
type BundleProvider ¶ added in v0.8.0
type BundleProvider interface {
Bundles(ctx context.Context, packageName string) ([]*catalogmetadata.Bundle, error)
}
BundleProvider provides the way to retrieve a list of Bundles from a source, generally from a catalog client of some kind.
type ClusterExtensionReconciler ¶ added in v0.9.0
type ClusterExtensionReconciler struct { client.Client BundleProvider BundleProvider Unpacker rukpaksource.Unpacker ActionClientGetter helmclient.ActionClientGetter Storage storage.Storage Handler registryv1handler.Handler InstalledBundleGetter InstalledBundleGetter Finalizers crfinalizer.Finalizers CaCertDir string Preflights []Preflight // contains filtered or unexported fields }
ClusterExtensionReconciler reconciles a ClusterExtension object
func (*ClusterExtensionReconciler) Reconcile ¶ added in v0.9.0
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 ¶ added in v0.9.0
func (r *ClusterExtensionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DefaultInstalledBundleGetter ¶ added in v0.11.0
type DefaultInstalledBundleGetter struct {
helmclient.ActionClientGetter
}
func (*DefaultInstalledBundleGetter) GetInstalledBundle ¶ added in v0.11.0
func (d *DefaultInstalledBundleGetter) GetInstalledBundle(ctx context.Context, ext *ocv1alpha1.ClusterExtension) (*ocv1alpha1.BundleMetadata, error)
type InstalledBundleGetter ¶ added in v0.11.0
type InstalledBundleGetter interface {
GetInstalledBundle(ctx context.Context, ext *ocv1alpha1.ClusterExtension) (*ocv1alpha1.BundleMetadata, error)
}
type Preflight ¶ added in v0.11.0
type Preflight interface { // Install runs checks that should be successful prior // to installing the Helm release. It is provided // a Helm release and returns an error if the // check is unsuccessful Install(context.Context, *release.Release) error // Upgrade runs checks that should be successful prior // to upgrading the Helm release. It is provided // a Helm release and returns an error if the // check is unsuccessful Upgrade(context.Context, *release.Release) error }
Preflight is a check that should be run before making any changes to the cluster