Documentation ¶
Index ¶
- Variables
- func HasPermissionToInstall(ctx context.Context, client client.Client, namespace string, global bool, ...) (bool, error)
- func Install(ctx context.Context, client client.Client, namespace string, global bool, ...) (bool, error)
- func IsAPIAvailable(c kubernetes.Interface) (bool, error)
- func IsOperatorInstalled(ctx context.Context, client client.Client, namespace string, global bool, ...) (bool, error)
- func Uninstall(ctx context.Context, client client.Client, namespace string, global bool, ...) error
- type Options
Constants ¶
This section is empty.
Variables ¶
var DefaultChannel = "stable"
DefaultChannel is the distribution channel in Operator Hub.
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.
var DefaultOperatorName = "camel-k"
DefaultOperatorName is the Camel K operator name in OLM.
var DefaultPackage = "camel-k"
DefaultPackage is the Camel K package in OLM.
var DefaultSource = "community-operators"
DefaultSource is the name of the operator source where the operator is published.
var DefaultSourceNamespace = "openshift-marketplace"
DefaultSourceNamespace is the namespace of the operator 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(c kubernetes.Interface) (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.