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(ctx context.Context, c kubernetes.Interface, namespace string) (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 = "alpha"
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 = "yaks-operator"
DefaultOperatorName is the YAKS operator name in OLM
var DefaultPackage = "yaks"
DefaultPackage is the YAKS 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/service-account has the right permissions to install yaks via OLM
func Install ¶
func Install(ctx context.Context, client client.Client, namespace string, global bool, options Options, collection *kubernetes.Collection) (bool, error)
Install creates a subscription for the OLM package
func IsAPIAvailable ¶
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.