client

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package olm provides an API to install, uninstall, and check the status of an Operator Lifecycle Manager installation. TODO: move to OLM repository?

Package olm provides an API to install, uninstall, and check the status of an Operator Lifecycle Manager installation. TODO: move to OLM repository?

Index

Constants

This section is empty.

Variables

View Source
var ErrOLMNotInstalled = errors.New("no existing installation found")
View Source
var Scheme = scheme.Scheme

Functions

This section is empty.

Types

type Client

type Client struct {
	KubeClient client.Client
}

func NewClientForConfig added in v1.1.0

func NewClientForConfig(cfg *rest.Config, httpClient *http.Client) (*Client, error)

func (Client) DoCSVWait

func (c Client) DoCSVWait(ctx context.Context, key types.NamespacedName) error

func (Client) DoCreate

func (c Client) DoCreate(ctx context.Context, objs ...client.Object) error

func (Client) DoDelete

func (c Client) DoDelete(ctx context.Context, objs ...client.Object) error

func (Client) DoRolloutWait

func (c Client) DoRolloutWait(ctx context.Context, key types.NamespacedName) error

func (Client) GetInstalledVersion added in v0.11.0

func (c Client) GetInstalledVersion(ctx context.Context, namespace string) (string, error)

GetInstalledVersion returns the OLM version installed in the namespace informed.

func (Client) GetObjectsStatus

func (c Client) GetObjectsStatus(ctx context.Context, objs ...client.Object) Status

type ResourceStatus

type ResourceStatus struct {
	NamespacedName types.NamespacedName
	Resource       *unstructured.Unstructured
	GVK            schema.GroupVersionKind
	Error          error
	// contains filtered or unexported fields
}

type Status

type Status struct {
	Resources []ResourceStatus
}

func (Status) HasInstalledResources added in v0.13.0

func (s Status) HasInstalledResources() (bool, error)

HasInstalledResources only returns true if at least one resource in s was returned successfully by the API server. A resource error status containing any error except "not found", or "no kind match" errors for Custom Resources, will result in HasInstalledResources returning false and the error.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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