helm

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package helm provides utility to leverage helm in tests without requiring the CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart = chart.Chart

Chart is a helm package that contains metadata, a default config, zero or more optionally parameterizable templates, and zero or more charts (dependencies).

type Client

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

Client represents the temporary helm environment.

func NewClient

func NewClient(kubeConfig string, opts ...ClientOption) (*Client, error)

NewClient will create a new helm client providing an isolated helm environment. Only a valid kubeconfig is required. Make sure to properly clean up temporary files by calling Close once finished.

func (*Client) AddRepository

func (c *Client) AddRepository(cfg *RepositoryEntry) error

AddRepository will append the RepositoryEntry to the temporary repositories-file. It will also block until the index-file was downloaded.

func (*Client) Close

func (c *Client) Close() error

Close will release all filesystem resources of the helm client instance. Make sure to always call this function if the helm client is not required anymore.

func (*Client) Install

func (c *Client) Install(chartName, version string, valuesOptions ValuesOptions, opts ...InstallOption) (*Release, error)

Install will try to locate the chart and download the specified version. If the chartName is a local path, it will try to load the local chart instead. With the chart locally available it will install it using the provided values and options.

func (*Client) List

func (c *Client) List() ([]*release.Release, error)

List will retrieve all installed releases from the cluster.

func (*Client) Uninstall

func (c *Client) Uninstall(releaseName string) error

Uninstall will remove the release from the cluster.

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption interface is implemented by all possible options to instantiate a new helm client.

func ClientWithDebugLog

func ClientWithDebugLog(debugLog DebugLog) ClientOption

ClientWithDebugLog will use the provided function to output debug logs of helm.

func ClientWithDriver

func ClientWithDriver(driver string) ClientOption

ClientWithDriver will change the helm storage driver. By default it will be 'secret', but 'configmap' and 'memory' are other sensible values.

func ClientWithNamespace

func ClientWithNamespace(namespace string) ClientOption

ClientWithNamespace will adapt the default namespace used as a fallback by the helm client.

type DebugLog

type DebugLog = action.DebugLog

DebugLog is the function declaration required to capture log output from the Client.

type InstallOption

type InstallOption interface {
	// contains filtered or unexported methods
}

ClientOption interface is implemented by all possible options to install charts.

func InstallWithReleaseName

func InstallWithReleaseName(name string) InstallOption

InstallWithReleaseName will override the release name, which will be a random string by default.

type Release

type Release = release.Release

Release describes a deployment of a chart, together with the chart and the variables used to deploy that chart.

type RepositoryEntry

type RepositoryEntry = repo.Entry

RepositoryEntry represents the collection of parameters to define a new entry of a helm repository.

type ValuesOptions

type ValuesOptions = values.Options

ValuesOptions provides several options to provide values configuration for helm. All contained values can then be conveniently merged.

Jump to

Keyboard shortcuts

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