olm

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultChannel = "stable"

DefaultChannel is the distribution channel in Operator Hub.

View Source
var DefaultGlobalNamespace = "openshift-operators"

DefaultGlobalNamespace indicates a namespace containing an OperatorGroup that enables the operator to watch all namespaces. It will be used in global installation mode.

View Source
var DefaultOperatorName = "camel-k"

DefaultOperatorName is the Camel K operator name in OLM.

View Source
var DefaultPackage = "camel-k"

DefaultPackage is the Camel K package in OLM.

View Source
var DefaultSource = "community-operators"

DefaultSource is the name of the operator source where the operator is published.

View Source
var DefaultSourceNamespace = "openshift-marketplace"

DefaultSourceNamespace is the namespace of the operator source.

View Source
var DefaultStartingCSV = ""

DefaultStartingCSV contains the specific version to install.

Functions

func HasPermissionToInstall

func HasPermissionToInstall(ctx context.Context, client client.Client, namespace string, global bool, options Options) (bool, error)

HasPermissionToInstall checks if the current user/serviceaccount has the right permissions to install camel k via OLM.

func Install

func Install(ctx context.Context, client client.Client, namespace string, global bool, options Options, collection *kubernetes.Collection,
	tolerations []string, nodeSelectors []string, resourcesRequirements []string, envVars []string) (bool, error)

Install creates a subscription for the OLM package.

func IsAPIAvailable

func IsAPIAvailable(ctx context.Context, c kubernetes.Interface, namespace string) (bool, error)

IsAPIAvailable returns true if we are connected to a cluster with OLM installed.

This method should not be called from the operator, as it might require permissions that are not available.

func IsOperatorInstalled

func IsOperatorInstalled(ctx context.Context, client client.Client, namespace string, global bool, options Options) (bool, error)

IsOperatorInstalled tells if a OLM CSV or a Subscription is already installed in the namespace.

func Uninstall

func Uninstall(ctx context.Context, client client.Client, namespace string, global bool, options Options) error

Uninstall removes CSV and subscription from the namespace.

Types

type Options

type Options struct {
	OperatorName    string
	Package         string
	Channel         string
	Source          string
	SourceNamespace string
	StartingCSV     string
	GlobalNamespace string
}

Options contains information about an operator in OLM.

Jump to

Keyboard shortcuts

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