Help us shape the future of Go! Take the 2026 Go Developer Survey

state

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderTemplateFileToBuffer added in v0.23.0

func RenderTemplateFileToBuffer(file string) (*bytes.Buffer, error)

Types

type HelmSpec added in v0.20.0

type HelmSpec struct {
	KubeContext     string   `yaml:"kubeContext"`
	TillerNamespace string   `yaml:"tillerNamespace"`
	Args            []string `yaml:"args"`
}

HelmSpec to defines helmDefault values

type HelmState

type HelmState struct {
	BaseChartPath      string
	FilePath           string
	HelmDefaults       HelmSpec         `yaml:"helmDefaults"`
	Context            string           `yaml:"context"`
	DeprecatedReleases []ReleaseSpec    `yaml:"charts"`
	Namespace          string           `yaml:"namespace"`
	Repositories       []RepositorySpec `yaml:"repositories"`
	Releases           []ReleaseSpec    `yaml:"releases"`
	// contains filtered or unexported fields
}

HelmState structure for the helmfile

func CreateFromTemplateFile added in v0.23.0

func CreateFromTemplateFile(file string, logger *zap.SugaredLogger) (*HelmState, error)

CreateFromTemplateFile loads the helmfile from disk and processes the template

func CreateFromYaml added in v0.23.0

func CreateFromYaml(content []byte, file string, logger *zap.SugaredLogger) (*HelmState, error)

func (*HelmState) Clean

func (state *HelmState) Clean() []error

Clean will remove any generated secrets

func (*HelmState) DeleteReleases

func (state *HelmState) DeleteReleases(helm helmexec.Interface, purge bool) []error

DeleteReleases wrapper for executing helm delete on the releases

func (*HelmState) DiffReleases

func (state *HelmState) DiffReleases(helm helmexec.Interface, additionalValues []string, workerLimit int, detailedExitCode bool) []error

DiffReleases wrapper for executing helm diff on the releases

func (*HelmState) FilterReleases

func (state *HelmState) FilterReleases(labels []string) error

FilterReleases allows for the execution of helm commands against a subset of the releases in the helmfile.

func (*HelmState) LintReleases added in v0.20.0

func (state *HelmState) LintReleases(helm helmexec.Interface, additionalValues []string, workerLimit int) []error

LintReleases wrapper for executing helm lint on the releases

func (*HelmState) ReleaseStatuses added in v0.14.0

func (state *HelmState) ReleaseStatuses(helm helmexec.Interface, workerLimit int) []error

func (*HelmState) SyncReleases

func (state *HelmState) SyncReleases(helm helmexec.Interface, additionalValues []string, workerLimit int) []error

SyncReleases wrapper for executing helm upgrade on the releases

func (*HelmState) SyncRepos

func (state *HelmState) SyncRepos(helm helmexec.Interface) []error

SyncRepos will update the given helm releases

func (*HelmState) TestReleases added in v0.18.0

func (state *HelmState) TestReleases(helm helmexec.Interface, cleanup bool, timeout int) []error

TestReleases wrapper for executing helm test on the releases

func (*HelmState) UpdateDeps

func (state *HelmState) UpdateDeps(helm helmexec.Interface) []error

UpdateDeps wrapper for updating dependencies on the releases

type LabelFilter

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

LabelFilter matches a release with the given positive lables. Negative labels invert the match for cases such as tier!=backend

func ParseLabels

func ParseLabels(l string) (LabelFilter, error)

ParseLabels takes a label in the form foo=bar,baz!=bat and returns a LabelFilter that will match the labels

func (LabelFilter) Match

func (l LabelFilter) Match(r ReleaseSpec) bool

Match will match a release that has the same labels as the filter

type ReleaseError added in v0.23.0

type ReleaseError struct {
	*ReleaseSpec
	// contains filtered or unexported fields
}

func (*ReleaseError) Error added in v0.23.0

func (e *ReleaseError) Error() string

type ReleaseFilter

type ReleaseFilter interface {
	// Match returns true if the ReleaseSpec matches the Filter
	Match(r ReleaseSpec) bool
}

ReleaseFilter is used to determine if a given release should be used during helmfile execution

type ReleaseSpec

type ReleaseSpec struct {
	// Chart is the name of the chart being installed to create this release
	Chart   string `yaml:"chart"`
	Version string `yaml:"version"`
	Verify  bool   `yaml:"verify"`
	Wait    bool   `yaml:"wait"`

	// Name is the name of this release
	Name      string            `yaml:"name"`
	Namespace string            `yaml:"namespace"`
	Labels    map[string]string `yaml:"labels"`
	Values    []interface{}     `yaml:"values"`
	Secrets   []string          `yaml:"secrets"`
	SetValues []SetValue        `yaml:"set"`

	// The 'env' section is not really necessary any longer, as 'set' would now provide the same functionality
	EnvValues []SetValue `yaml:"env"`
	// contains filtered or unexported fields
}

ReleaseSpec defines the structure of a helm release

type RepositorySpec

type RepositorySpec struct {
	Name     string `yaml:"name"`
	URL      string `yaml:"url"`
	CertFile string `yaml:"certFile"`
	KeyFile  string `yaml:"keyFile"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

RepositorySpec that defines values for a helm repo

type SetValue

type SetValue struct {
	Name   string   `yaml:"name"`
	Value  string   `yaml:"value"`
	File   string   `yaml:"file"`
	Values []string `yaml:"values"`
}

SetValue are the key values to set on a helm release

Jump to

Keyboard shortcuts

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