operator

package
v4.5.12 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 27 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogSource

type CatalogSource struct {
	Name                 string
	Namespace            string
	OpNamespace          string
	RegistryNamespace    string
	Priority             int
	ODLMCatalog          string
	ODLMCatalogNamespace string
}

type ODLMOperator

type ODLMOperator struct {
	client.Client
	client.Reader
	*rest.Config
	Recorder                record.EventRecorder
	Scheme                  *runtime.Scheme
	MaxConcurrentReconciles int
}

ODLMOperator is the struct for ODLM controllers

func NewODLMOperator

func NewODLMOperator(mgr manager.Manager, name string) *ODLMOperator

NewODLMOperator is the method to initialize an Operator struct

func (*ODLMOperator) CheckLabel

func (m *ODLMOperator) CheckLabel(unstruct unstructured.Unstructured, labels map[string]string) bool

func (*ODLMOperator) CheckResAuth added in v4.3.8

func (m *ODLMOperator) CheckResAuth(ctx context.Context, namespace, group, resource, verb string) bool

func (*ODLMOperator) DeleteRedundantCSV added in v4.3.4

func (m *ODLMOperator) DeleteRedundantCSV(ctx context.Context, csvName, operatorNs, serviceNs, packageName string) error

func (*ODLMOperator) EnsureAnnotation

func (m *ODLMOperator) EnsureAnnotation(cr unstructured.Unstructured, annotations map[string]string)

func (*ODLMOperator) EnsureLabel

func (m *ODLMOperator) EnsureLabel(cr unstructured.Unstructured, labels map[string]string)

func (*ODLMOperator) EvaluateExpression added in v4.3.11

func (m *ODLMOperator) EvaluateExpression(ctx context.Context, expr *util.LogicalExpression, instanceType, instanceName, instanceNs string) (bool, error)

func (*ODLMOperator) GetCatalogSourceAndChannelFromPackage added in v4.3.5

func (m *ODLMOperator) GetCatalogSourceAndChannelFromPackage(ctx context.Context, opregCatalog, opregCatalogNs, packageName, namespace, channel string, fallbackChannels []string,
	registryNs, odlmCatalog, odlmCatalogNs string, excludedCatalogSources []string) (catalogSourceName string, catalogSourceNs string, availableChannel string, err error)

func (*ODLMOperator) GetClusterServiceVersion

func (m *ODLMOperator) GetClusterServiceVersion(ctx context.Context, sub *olmv1alpha1.Subscription) (*olmv1alpha1.ClusterServiceVersion, error)

GetClusterServiceVersion gets the ClusterServiceVersion from the subscription

func (*ODLMOperator) GetClusterServiceVersionList added in v4.3.2

func (m *ODLMOperator) GetClusterServiceVersionList(ctx context.Context, sub *olmv1alpha1.Subscription) ([]*olmv1alpha1.ClusterServiceVersion, error)

GetClusterServiceVersionList gets a list of ClusterServiceVersions from the subscription

func (*ODLMOperator) GetClusterServiceVersionListFromPackage added in v4.3.5

func (m *ODLMOperator) GetClusterServiceVersionListFromPackage(ctx context.Context, name, namespace string) ([]*olmv1alpha1.ClusterServiceVersion, error)

GetClusterServiceVersionList gets a list of ClusterServiceVersions from the subscription

func (*ODLMOperator) GetDefaultValueFromTemplate

func (m *ODLMOperator) GetDefaultValueFromTemplate(ctx context.Context, template *util.TemplateValueRef, instanceType, instanceName, instanceNs string) (string, error)

func (*ODLMOperator) GetDeploymentListFromPackage added in v4.4.0

func (m *ODLMOperator) GetDeploymentListFromPackage(ctx context.Context, name, namespace string) ([]*appsv1.Deployment, error)

func (*ODLMOperator) GetOpReqCM added in v4.4.0

func (m *ODLMOperator) GetOpReqCM(ctx context.Context, operatorName, operatorNs, servicesNs string) (*corev1.ConfigMap, error)

func (*ODLMOperator) GetOperandConfig

func (m *ODLMOperator) GetOperandConfig(ctx context.Context, key types.NamespacedName) (*apiv1alpha1.OperandConfig, error)

GetOperandConfig gets the OperandConfig

func (*ODLMOperator) GetOperandFromRegistry added in v4.3.2

func (m *ODLMOperator) GetOperandFromRegistry(ctx context.Context, reg *apiv1alpha1.OperandRegistry, operandName string) (*apiv1alpha1.Operator, error)

GetOperandFromRegistry gets the Operand from the OperandRegistry

func (*ODLMOperator) GetOperandFromRegistryNoOLM added in v4.4.0

func (m *ODLMOperator) GetOperandFromRegistryNoOLM(ctx context.Context, reg *apiv1alpha1.OperandRegistry, operandName string) (*apiv1alpha1.Operator, error)

func (*ODLMOperator) GetOperandRegistry

func (m *ODLMOperator) GetOperandRegistry(ctx context.Context, key types.NamespacedName) (*apiv1alpha1.OperandRegistry, error)

GetOperandRegistry gets the OperandRegistry instance with default value

func (*ODLMOperator) GetOperandRequest

func (m *ODLMOperator) GetOperandRequest(ctx context.Context, key types.NamespacedName) (*apiv1alpha1.OperandRequest, error)

GetOperandRequest gets OperandRequest

func (*ODLMOperator) GetOperatorNamespace

func (m *ODLMOperator) GetOperatorNamespace(installMode, namespace string) string

GetOperatorNamespace returns the operator namespace based on the install mode

func (*ODLMOperator) GetSubscription

func (m *ODLMOperator) GetSubscription(ctx context.Context, name, operatorNs, servicesNs, packageName string) (*olmv1alpha1.Subscription, error)

GetSubscription gets Subscription by name and package name

func (*ODLMOperator) GetValueFromBranch added in v4.3.11

func (m *ODLMOperator) GetValueFromBranch(ctx context.Context, branch *util.ValueSource, branchName, key string, instanceType, instanceName, instanceNs string) (string, error)

GetValueFromBranch retrieves a value from a specific branch (then/else)

func (*ODLMOperator) GetValueFromSource added in v4.3.11

func (m *ODLMOperator) GetValueFromSource(ctx context.Context, source *util.ValueSource, instanceType, instanceName, instanceNs string) (string, error)

GetValueFromSource gets a value from the specified source

func (*ODLMOperator) GetValueRefFromConfigMap

func (m *ODLMOperator) GetValueRefFromConfigMap(ctx context.Context, instanceType, instanceName, instanceNs, cmName, cmNs, configMapKey string) (string, error)

func (*ODLMOperator) GetValueRefFromObject

func (m *ODLMOperator) GetValueRefFromObject(ctx context.Context, instanceType, instanceName, instanceNs, objAPIVersion, objKind, objName, objNs, path string) (string, error)

func (*ODLMOperator) GetValueRefFromSecret

func (m *ODLMOperator) GetValueRefFromSecret(ctx context.Context, instanceType, instanceName, instanceNs, secretName, secretNs, secretKey string) (string, error)

func (*ODLMOperator) HasLabel

func (m *ODLMOperator) HasLabel(cr unstructured.Unstructured, labelName string) bool

func (*ODLMOperator) ListOperandRegistry

func (m *ODLMOperator) ListOperandRegistry(ctx context.Context, label map[string]string) (*apiv1alpha1.OperandRegistryList, error)

ListOperandRegistry lists the OperandRegistry instance with default value

func (*ODLMOperator) ListOperandRequests

func (m *ODLMOperator) ListOperandRequests(ctx context.Context, label map[string]string) (*apiv1alpha1.OperandRequestList, error)

ListOperandRequests list all the OperandRequests with specific label

func (*ODLMOperator) ListOperandRequestsByConfig

func (m *ODLMOperator) ListOperandRequestsByConfig(ctx context.Context, key types.NamespacedName) (requestList []apiv1alpha1.OperandRequest, err error)

ListOperandRequestsByConfig list all the OperandRequests using the specific OperandConfig

func (*ODLMOperator) ListOperandRequestsByRegistry

func (m *ODLMOperator) ListOperandRequestsByRegistry(ctx context.Context, key types.NamespacedName) (requestList []apiv1alpha1.OperandRequest, err error)

ListOperandRequestsByRegistry list all the OperandRequests using the specific OperandRegistry

func (*ODLMOperator) ObjectIsUpdatedWithException added in v4.3.9

func (m *ODLMOperator) ObjectIsUpdatedWithException(oldObject, newObject client.Object) bool

ObjectIsUpdatedWithException checks if the reference object changed except for ODLM-managed metadata.

func (*ODLMOperator) ParseConfigMapRef

func (m *ODLMOperator) ParseConfigMapRef(ctx context.Context, cm *util.ConfigMapRef, instanceType, instanceName, instanceNs string) (string, error)

func (*ODLMOperator) ParseObjectRef

func (m *ODLMOperator) ParseObjectRef(ctx context.Context, obj *util.ObjectRef, instanceType, instanceName, instanceNs string) (string, error)

func (*ODLMOperator) ParseSecretKeyRef

func (m *ODLMOperator) ParseSecretKeyRef(ctx context.Context, secret *util.SecretRef, instanceType, instanceName, instanceNs string) (string, error)

func (*ODLMOperator) ParseValueReferenceInObject

func (m *ODLMOperator) ParseValueReferenceInObject(ctx context.Context, key string, object interface{}, finalObject map[string]interface{}, instanceType, instanceName, instanceNs string) error

ParseValueReferenceInObject processes templates in objects and resolves value references

Jump to

Keyboard shortcuts

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