helm

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoKindMatch

func IsNoKindMatch(err error) bool

func NewMockHelm

func NewMockHelm(create func(ctx context.Context, namespace string, manifests Manifests) error,
	delete func(ctx context.Context, namespace string, manifests Manifests) error,
	update func(ctx context.Context, namespace string, original, updated Manifests, recreatePods bool) error) *mockHelm

Types

type Installer

type Installer interface {
	// create the resources described in the manifest
	CreateFromManifests(ctx context.Context, namespace string, manifests Manifests) error
	// delete the resources described in the manifest
	DeleteFromManifests(ctx context.Context, namespace string, manifests Manifests) error
	// perform a diff and apply patches to migrate from original to updated manifests
	UpdateFromManifests(ctx context.Context, namespace string, original, updated Manifests, recreatePods bool) error
}

an interface allowing these methods to be mocked

func NewHelmInstaller

func NewHelmInstaller() Installer

type ManifestFilterFunc

type ManifestFilterFunc func(input []manifest.Manifest) (output []manifest.Manifest, err error)
var ExcludeEmptyManifests ManifestFilterFunc = func(input []manifest.Manifest) ([]manifest.Manifest, error) {
	var output []manifest.Manifest
	for _, manifest := range input {
		if !isEmptyManifest(manifest.Content) {
			output = append(output, manifest)
		}

	}
	return output, nil
}

Returns only non-empty manifests

func ReplaceHardcodedNamespace

func ReplaceHardcodedNamespace(hardcoded, override string) ManifestFilterFunc

type Manifests

type Manifests []manifest.Manifest

func InstallOrUpdate

func InstallOrUpdate(ctx context.Context, opts Options, filterFuncs ...ManifestFilterFunc) (Manifests, error)

func NewManifestsFromGzippedString

func NewManifestsFromGzippedString(gzippedString string) (Manifests, error)

returns creates a set of manifests from a gzipped, base64 encoded string

func RenderManifests

func RenderManifests(ctx context.Context, chartUri, values, releaseName, namespace, kubeVersion string, releaseIsInstall bool) (Manifests, error)

func (Manifests) CombinedString

func (m Manifests) CombinedString() string

func (Manifests) Find

func (m Manifests) Find(name string) *manifest.Manifest

func (Manifests) Gzipped

func (m Manifests) Gzipped() (string, error)

returns the set of manifests as a gzipped+base64'ed string

func (Manifests) Names

func (m Manifests) Names() string

func (Manifests) SplitByCrds

func (m Manifests) SplitByCrds() (Manifests, Manifests)

type Options

type Options interface {
	// type of install
	InstallName() string
	// uri of chart
	ChartUri() string
	// version to install
	Version() string
	// namespace to install into
	Namespace() string
	// validator function for opts
	Validate() error
	// previous install
	PreviousInstall() Manifests
	// installer which should be called
	Installer() Installer
	// template which is called with opts, and passed into render as values
	HelmValuesTemplate() string
}

Jump to

Keyboard shortcuts

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