helm

package
v0.0.0-...-0755659 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BackendLocal represents cluster-local chart repository backend.
	BackendLocal = "local"
)

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(config Config) (*clusterRepository, error)

NewRepository returns a new cluster chart repository.

func Render

func Render(p RenderParameters) ([]byte, error)

RenderHelm renders templates of a provided Helm chart.

Types

type Client

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

Client is the Helm client.

func NewClient

func NewClient(conf ClientConfig) (*Client, error)

NewClient returns a new Helm client instance.

func (*Client) Close

func (c *Client) Close() error

Close closes the Helm client.

func (*Client) Get

func (c *Client) Get(name string) (*Release, error)

Get returns a single release with the specified name.

func (*Client) Install

func (c *Client) Install(p InstallParameters) (*Release, error)

Install installs a Helm chart and returns release information.

func (*Client) List

func (c *Client) List(p ListParameters) ([]Release, error)

List returns list of releases matching provided parameters.

func (*Client) Revisions

func (c *Client) Revisions(name string) ([]Release, error)

Revisions returns revision history for a release with the provided name.

func (*Client) Rollback

func (c *Client) Rollback(p RollbackParameters) (*Release, error)

Rollback rolls back a release to the specified version.

func (*Client) Uninstall

func (c *Client) Uninstall(name string) (*Release, error)

Uninstall uninstalls a release with the provided name.

func (*Client) Upgrade

func (c *Client) Upgrade(p UpgradeParameters) (*Release, error)

Upgrade upgrades a release.

type ClientConfig

type ClientConfig struct {
	// DNSAddress is an optional in-cluster DNS address.
	DNSAddress string
}

ClientConfig is the Helm client configuration.

type Config

type Config struct {
	// Packages is the cluster package service.
	Packages pack.PackageService
	// Backend is the cluster backend.
	Backend storage.Backend
}

Config is the chart repository configuration.

type InstallParameters

type InstallParameters struct {
	// Path is the Helm chart path.
	Path string
	// Values is a list of YAML files with values.
	Values []string
	// Set is a list of values set on the CLI.
	Set []string
	// Name is an optional release name.
	Name string
	// Namespace is a namespace to install release into.
	Namespace string
}

InstallParameters defines Helm chart install parameters.

type ListParameters

type ListParameters struct {
	// Filter is an optional release name filter as a perl regex.
	Filter string
}

ListParameters defines parameters for listing releases.

type Release

type Release struct {
	// Name is a release name.
	Name string
	// Status is release status.
	Status string
	// Chart is a deployed chart name and version.
	Chart string
	// Namespace is a namespace where release is deployed.
	Namespace string
	// Updated is when a release was last updated.
	Updated time.Time
	// Revision is a release version number.
	//
	// It begins at 1 and is incremented for each upgrade/rollback.
	Revision int
	// Description is a release description.
	Description string
}

Release describes an application release.

type RenderParameters

type RenderParameters struct {
	// Path is a chart path.
	Path string
	// Values is a list of YAML files with values.
	Values []string
	// Set is a list of values set on the CLI.
	Set []string
}

RenderParameters defines parameters to render Helm template.

type Repository

type Repository interface {
	// FetchChart returns the specified application as a Helm chart tarball.
	FetchChart(loc.Locator) (io.ReadCloser, error)
	// GetIndexFile returns the chart repository index file.
	GetIndexFile() (io.Reader, error)
	// AddToIndex adds the specified application to the repository index.
	AddToIndex(locator loc.Locator, upsert bool) error
	// RemoveFromIndex removes the specified application from the repository index.
	RemoveFromIndex(loc.Locator) error
	// RebuildIndex fully rebuilds the chart repository index.
	RebuildIndex() error
}

Repository defines interface for a Helm repository backend.

type RollbackParameters

type RollbackParameters struct {
	// Release is a name of the release to rollback.
	Release string
	// Revision is a revision number to rollback to.
	Revision int
}

RollbackParameters defines release rollback parameters.

type UpgradeParameters

type UpgradeParameters struct {
	// Release is a name of the release to upgrade.
	Release string
	// Path is an upgrade chart path.
	Path string
	// Values is a list of YAML files with values.
	Values []string
	// Set is a list of values set on the CLI.
	Set []string
}

UpgradeParameters defines release upgrade parameters.

Jump to

Keyboard shortcuts

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