catalog

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 86 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PrometheusRuleKind        = "PrometheusRule"
	ServiceMonitorKind        = "ServiceMonitor"
	PodDisruptionBudgetKind   = "PodDisruptionBudget"
	PriorityClassKind         = "PriorityClass"
	VerticalPodAutoscalerKind = "VerticalPodAutoscaler"
	ConsoleYAMLSampleKind     = "ConsoleYAMLSample"
	ConsoleQuickStartKind     = "ConsoleQuickStart"
	ConsoleCLIDownloadKind    = "ConsoleCLIDownload"
	ConsoleLinkKind           = "ConsoleLink"
)
View Source
const (
	RegistryFieldManager = "olm.registry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogSourceSyncFunc

type CatalogSourceSyncFunc func(logger *logrus.Entry, in *v1alpha1.CatalogSource) (out *v1alpha1.CatalogSource, continueSync bool, syncError error)

type DiscoveryQuerier added in v0.19.0

type DiscoveryQuerier interface {
	QueryForGVK() error
}

type DiscoveryQuerierFunc added in v0.19.0

type DiscoveryQuerierFunc func() error

func (DiscoveryQuerierFunc) QueryForGVK added in v0.19.0

func (d DiscoveryQuerierFunc) QueryForGVK() error

type ManifestResolver

type ManifestResolver interface {
	ManifestForStep(step *v1alpha1.Step) (string, error)
}

ManifestResolver can dereference a manifest for a step. Steps may embed manifests directly or reference content in configmaps

type Operator

type Operator struct {
	queueinformer.Operator
	// contains filtered or unexported fields
}

Operator represents a Kubernetes operator that executes InstallPlans by resolving dependencies in a catalog.

func NewOperator

func NewOperator(ctx context.Context, kubeconfigPath string, clock utilclock.Clock, logger *logrus.Logger, resync time.Duration, configmapRegistryImage, opmImage, utilImage string, operatorNamespace string, scheme *runtime.Scheme, installPlanTimeout time.Duration, bundleUnpackTimeout time.Duration, workloadUserID int64) (*Operator, error)

NewOperator creates a new Catalog Operator.

func (*Operator) ExecutePlan

func (o *Operator) ExecutePlan(plan *v1alpha1.InstallPlan) error

ExecutePlan applies a planned InstallPlan to a namespace.

type OperatorGroupToggleSourceProvider added in v0.22.0

type OperatorGroupToggleSourceProvider struct {
	// contains filtered or unexported fields
}

func NewOperatorGroupToggleSourceProvider added in v0.22.0

func NewOperatorGroupToggleSourceProvider(sp cache.SourceProvider, logger *logrus.Logger,
	ogLister v1listers.OperatorGroupLister) *OperatorGroupToggleSourceProvider

func (*OperatorGroupToggleSourceProvider) CheckForExclusion added in v0.22.0

func (e *OperatorGroupToggleSourceProvider) CheckForExclusion(namespaces ...string) ([]string, error)

func (*OperatorGroupToggleSourceProvider) Sources added in v0.22.0

func (e *OperatorGroupToggleSourceProvider) Sources(namespaces ...string) map[cache.SourceKey]cache.Source

type StepEnsurer

type StepEnsurer struct {
	// contains filtered or unexported fields
}

StepEnsurer ensures that resource(s) specified in install plan exist in cluster.

func (*StepEnsurer) EnsureBundleSecret

func (o *StepEnsurer) EnsureBundleSecret(namespace string, secret *corev1.Secret) (status v1alpha1.StepStatus, err error)

EnsureBundleSecret creates user-specified secrets from the bundle. Called when StepResource.Secret is true

func (*StepEnsurer) EnsureClusterRole

func (o *StepEnsurer) EnsureClusterRole(cr *rbacv1.ClusterRole, step *v1alpha1.Step) (status v1alpha1.StepStatus, err error)

EnsureClusterRole writes the specified ClusterRole object to the cluster.

func (*StepEnsurer) EnsureClusterRoleBinding

func (o *StepEnsurer) EnsureClusterRoleBinding(crb *rbacv1.ClusterRoleBinding, step *v1alpha1.Step) (status v1alpha1.StepStatus, err error)

EnsureClusterRoleBinding writes the specified ClusterRoleBinding object to the cluster.

func (*StepEnsurer) EnsureClusterServiceVersion

func (o *StepEnsurer) EnsureClusterServiceVersion(csv *v1alpha1.ClusterServiceVersion) (status v1alpha1.StepStatus, err error)

EnsureClusterServiceVersion writes the specified ClusterServiceVersion object to the cluster.

func (*StepEnsurer) EnsureConfigMap

func (o *StepEnsurer) EnsureConfigMap(namespace string, configmap *corev1.ConfigMap) (status v1alpha1.StepStatus, err error)

EnsureConfigMap writes the specified ConfigMap object to the cluster.

func (*StepEnsurer) EnsureRole

func (o *StepEnsurer) EnsureRole(namespace string, role *rbacv1.Role) (status v1alpha1.StepStatus, err error)

EnsureRole writes the specified Role object to the cluster.

func (*StepEnsurer) EnsureRoleBinding

func (o *StepEnsurer) EnsureRoleBinding(namespace string, rb *rbacv1.RoleBinding) (status v1alpha1.StepStatus, err error)

EnsureRoleBinding writes the specified RoleBinding object to the cluster.

func (*StepEnsurer) EnsureSecret

func (o *StepEnsurer) EnsureSecret(operatorNamespace, planNamespace, name string) (status v1alpha1.StepStatus, err error)

EnsureSecret copies the secret from the OLM namespace and writes a new one to the namespace requested.

func (*StepEnsurer) EnsureService

func (o *StepEnsurer) EnsureService(namespace string, service *corev1.Service) (status v1alpha1.StepStatus, err error)

EnsureService writes the specified Service object to the cluster.

func (*StepEnsurer) EnsureServiceAccount

func (o *StepEnsurer) EnsureServiceAccount(namespace string, sa *corev1.ServiceAccount) (status v1alpha1.StepStatus, err error)

EnsureServiceAccount writes the specified ServiceAccount object to the cluster.

func (*StepEnsurer) EnsureSubscription

func (o *StepEnsurer) EnsureSubscription(subscription *v1alpha1.Subscription) (status v1alpha1.StepStatus, err error)

EnsureSubscription writes the specified Subscription object to the cluster.

func (*StepEnsurer) EnsureUnstructuredObject

func (o *StepEnsurer) EnsureUnstructuredObject(client dynamic.ResourceInterface, obj *unstructured.Unstructured) (status v1alpha1.StepStatus, err error)

EnsureUnstructuredObject writes the unspecified resource object to the cluster.

type Stepper

type Stepper interface {
	Status() (v1alpha1.StepStatus, error)
}

Stepper manages cluster interactions based on the step.

type StepperFunc

type StepperFunc func() (v1alpha1.StepStatus, error)

StepperFunc fulfills the Stepper interface.

func (StepperFunc) Status

func (s StepperFunc) Status() (v1alpha1.StepStatus, error)

type UnpackedBundleReference

type UnpackedBundleReference struct {
	Kind                   string `json:"kind"`
	Name                   string `json:"name"`
	Namespace              string `json:"namespace"`
	CatalogSourceName      string `json:"catalogSourceName"`
	CatalogSourceNamespace string `json:"catalogSourceNamespace"`
	Replaces               string `json:"replaces"`
	Properties             string `json:"properties"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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