helm

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 24 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HelmV2 represents helm V2 specific settings
	HelmV2 = HelmVer{
			// contains filtered or unexported fields
	}
	// HelmV3 represents helm V3 specific settings
	HelmV3 = HelmVer{
			// contains filtered or unexported fields
	}
)

Functions

func IsHelmOciChart added in v1.8.2

func IsHelmOciChart(chart string) bool

Only OCI registries support storing charts under sub-directories.

func IsMissingDependencyErr added in v0.11.0

func IsMissingDependencyErr(err error) bool

IsMissingDependencyErr tests if the error is related to a missing chart dependency

func IsVersion added in v1.3.1

func IsVersion(text string) bool

func Version added in v1.2.4

func Version(shortForm bool) (string, error)

Types

type Client added in v1.2.4

type Client interface {
	CleanChartCache(chart string, version *semver.Version) error
	ExtractChart(chart string, version *semver.Version) (string, io.Closer, error)
	GetIndex() (*Index, error)
	TestHelmOCI() (bool, error)
}

func NewClient added in v1.2.4

func NewClient(repoURL string, creds Creds, enableOci bool) Client

func NewClientWithLock added in v1.2.4

func NewClientWithLock(repoURL string, creds Creds, repoLock sync.KeyLock, enableOci bool) Client

type Cmd added in v1.2.4

type Cmd struct {
	HelmVer

	WorkDir   string
	IsLocal   bool
	IsHelmOci bool
	// contains filtered or unexported fields
}

A thin wrapper around the "helm" command, adding logging and error translation.

func NewCmd added in v1.2.4

func NewCmd(workDir string, version string) (*Cmd, error)

func NewCmdWithVersion added in v1.5.0

func NewCmdWithVersion(workDir string, version HelmVer, isHelmOci bool) (*Cmd, error)

func (*Cmd) ChartExport added in v1.8.2

func (c *Cmd) ChartExport(repo string, chartName string, version string, destination string) (string, error)

func (*Cmd) ChartPull added in v1.8.2

func (c *Cmd) ChartPull(repo string, chart string, version string) (string, error)

func (*Cmd) Close added in v1.2.4

func (c *Cmd) Close()

func (*Cmd) Fetch added in v1.2.4

func (c *Cmd) Fetch(repo, chartName, version, destination string, creds Creds) (string, error)

func (*Cmd) Init added in v1.2.4

func (c *Cmd) Init() (string, error)

func (*Cmd) Login added in v1.8.0

func (c *Cmd) Login(repo string, creds Creds) (string, error)

func (*Cmd) Logout added in v1.8.0

func (c *Cmd) Logout(repo string, creds Creds) (string, error)

func (*Cmd) RepoAdd added in v1.2.4

func (c *Cmd) RepoAdd(name string, url string, opts Creds) (string, error)

type Creds added in v1.2.4

type Creds struct {
	Username           string
	Password           string
	CAPath             string
	CertData           []byte
	KeyData            []byte
	InsecureSkipVerify bool
}

type Entries added in v1.4.0

type Entries []Entry

func (Entries) MaxVersion added in v1.4.0

func (e Entries) MaxVersion(constraints *semver.Constraints) (*semver.Version, error)

type Entry added in v1.2.4

type Entry struct {
	Version string
	Created time.Time
}

type Helm

type Helm interface {
	// Template returns a list of unstructured objects from a `helm template` command
	Template(opts *TemplateOpts) (string, error)
	// GetParameters returns a list of chart parameters taking into account values in provided YAML files.
	GetParameters(valuesFiles []string) (map[string]string, error)
	// DependencyBuild runs `helm dependency build` to download a chart's dependencies
	DependencyBuild() error
	// Init runs `helm init --client-only`
	Init() error
	// Dispose deletes temp resources
	Dispose()
}

Helm provides wrapper functionality around the `helm` command.

func NewHelmApp

func NewHelmApp(workDir string, repos []HelmRepository, isLocal bool, version string) (Helm, error)

NewHelmApp create a new wrapper to run commands on the `helm` command-line tool.

type HelmRepository added in v1.2.4

type HelmRepository struct {
	Creds
	Name string
	Repo string
}

type HelmVer added in v1.5.0

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

HelmVer contains Helm version specific settings such as helm binary and command names

type Index added in v1.2.4

type Index struct {
	Entries map[string]Entries
}

func (*Index) GetEntries added in v1.4.0

func (i *Index) GetEntries(chart string) (Entries, error)

type TemplateOpts added in v1.2.4

type TemplateOpts struct {
	Name        string
	Namespace   string
	KubeVersion string
	APIVersions []string
	Set         map[string]string
	SetString   map[string]string
	SetFile     map[string]string
	Values      []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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