controllers

package
v0.0.0-...-458c44a Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OdfSubscriptionPackage      = "odf-operator"
	OdfDepsSubscriptionPackage  = "odf-dependencies"
	CnsaDepsSubscriptionPackage = "cnsa-dependencies"
)
View Source
const (
	CsvWebhookPath = "/mutate-operators-coreos-com-v1alpha1-csv"
)

Variables

View Source
var (
	StorageClusterKind = odfv1a1.StorageKind("storagecluster.ocs.openshift.io/v1")
	FlashSystemKind    = odfv1a1.StorageKind("flashsystemcluster.odf.ibm.com/v1alpha1")
)
View Source
var AllQuickStarts = [][]byte{[]byte(gettingStartedQS), []byte(odfConfigAndManagementQS)}
View Source
var (
	DepsSubscriptionPackageNames = []string{
		OdfDepsSubscriptionPackage,
		CnsaDepsSubscriptionPackage,
	}
)
View Source
var (
	EmptyOdfOperatorConfigMapRecord = OdfOperatorConfigMapRecord{}
)
View Source
var (
	OperatorNamespace string
)

Functions

func AdjustSpecialCasesSubscriptionConfig

func AdjustSpecialCasesSubscriptionConfig(subscription *opv1a1.Subscription)

func ApproveInstallPlanForCsv

func ApproveInstallPlanForCsv(ctx context.Context, cli client.Client, csvName string, namespace string) error

ApproveInstallPlanForCsv approve the manual approval installPlan for the given CSV and returns an error if none found

func EnsureCsv

func EnsureCsv(ctx context.Context, cli client.Client, olmPkgRecord *OlmPkgRecord) error

func EnsureDesiredSubscription

func EnsureDesiredSubscription(ctx context.Context, cli client.Client, olmPkgRecord *OlmPkgRecord, providerName providerType) error

func GetDesiredSubscription

func GetDesiredSubscription(ctx context.Context, cli client.Client, record *OlmPkgRecord) (*opv1a1.Subscription, error)

CheckForExistingSubscription looks for any existing Subscriptions that reference the given package. If one does exist, use its ObjectMeta for the desiredSubscription.

NOTE(jarrpa): We can't use client.MatchingFields to limit the list results because fake.Client does not support them.

func GetEnvOrPanic

func GetEnvOrPanic(env string) string

func GetOdfConfigMap

func GetOdfConfigMap(ctx context.Context, cli client.Client, logger logr.Logger) (corev1.ConfigMap, error)

func GetOdfSubscription

func GetOdfSubscription(ctx context.Context, cli client.Client) (*opv1a1.Subscription, error)

GetOdfSubscription returns the subscription for odf-operator.

func ParseOdfConfigMapRecords

func ParseOdfConfigMapRecords(logger logr.Logger, configmap corev1.ConfigMap, fn func(*OdfOperatorConfigMapRecord, string, string))

func SetOdfSubControllerReference

func SetOdfSubControllerReference(ctx context.Context, cli client.Client, obj client.Object) error

Types

type CleanupReconciler

type CleanupReconciler struct {
	client.Client

	Scheme            *runtime.Scheme
	OperatorNamespace string
}

func (*CleanupReconciler) Reconcile

func (r *CleanupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*CleanupReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ClusterVersionReconciler

type ClusterVersionReconciler struct {
	client.Client
	Scheme      *runtime.Scheme
	ConsolePort int32
}

ClusterVersionReconciler reconciles a ClusterVersion object

func (*ClusterVersionReconciler) Reconcile

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*ClusterVersionReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type KindCsvsRecord

type KindCsvsRecord struct {
	ApiVersion string
	Kind       string
	Namespace  string
	CsvNames   []string
}

type OdfOperatorConfigMapRecord

type OdfOperatorConfigMapRecord struct {
	Channel             string   `yaml:"channel"`
	Csv                 string   `yaml:"csv"`
	Pkg                 string   `yaml:"pkg"`
	Namespace           string   `yaml:"namespace"`
	ScaleUpOnInstanceOf []string `yaml:"scaleUpOnInstanceOf"`
}

type OlmPkgRecord

type OlmPkgRecord struct {
	Channel   string
	Csv       string
	Pkg       string
	Namespace string
}

type OperatorScalerReconciler

type OperatorScalerReconciler struct {
	client.Client

	Scheme            *runtime.Scheme
	OperatorNamespace string
	// contains filtered or unexported fields
}

func (*OperatorScalerReconciler) Reconcile

func (*OperatorScalerReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type SubscriptionReconciler

type SubscriptionReconciler struct {
	client.Client

	Scheme            *runtime.Scheme
	OperatorNamespace string
	// contains filtered or unexported fields
}

func (*SubscriptionReconciler) Reconcile

func (*SubscriptionReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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