controllers

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

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

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

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

Jump to

Keyboard shortcuts

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