release

package
v1.0.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LabelSuccess     = "success"
	LabelNamespace   = "namespace"
	LabelReleaseName = "release_name"
)
View Source
const (
	ReasonGitNotReady      = "GitNotReady"
	ReasonGitCloned        = "GitRepoCloned"
	ReasonDownloadFailed   = "RepoFetchFailed"
	ReasonDownloaded       = "RepoChartInCache"
	ReasonInstallFailed    = "HelmInstallFailed"
	ReasonClientError      = "HelmClientError"
	ReasonDependencyFailed = "UpdateDependencyFailed"
	ReasonUpgradeFailed    = "HelmUpgradeFailed"
	ReasonRollbackFailed   = "HelmRollbackFailed"
	ReasonSuccess          = "HelmSuccess"
)

Condition change reasons.

View Source
const AntecedentAnnotation = "helm.fluxcd.io/antecedent"

AntecedentAnnotation is an annotation on a resource indicating that the cause of that resource is a HelmRelease. We use this rather than the `OwnerReference` type built into Kubernetes so that there are no garbage-collection implications. The value is expected to be a serialised `resource.ID`.

Variables

View Source
var (
	ErrDepUpdate       = errors.New("failed updating dependencies")
	ErrNoChartSource   = errors.New("no chart source given")
	ErrComposingValues = errors.New("failed to compose values for chart release")
	ErrShouldSync      = errors.New("failed to determine if the release should be synced")
	ErrRolledBack      = errors.New("upgrade failed and release has been rolled back")
)

Various (final) errors.

Functions

func ObserveRelease

func ObserveRelease(start time.Time, success bool, namespace, releaseName string)

Types

type Config

type Config struct {
	ChartCache string
	UpdateDeps bool
	LogDiffs   bool
}

Config holds the configuration for releases.

func (Config) WithDefaults

func (c Config) WithDefaults() Config

WithDefaults sets the default values for the release config.

type Release

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

Release holds the elements required to perform a Helm release, and provides the methods to perform a sync or uninstall.

func New

func New(logger log.Logger, coreV1Client corev1client.CoreV1Interface, helmReleaseClient v1client.HelmV1Interface,
	gitChartSync *chartsync.GitChartSync, config Config) *Release

func (*Release) Sync

func (r *Release) Sync(client helm.Client, hr *v1.HelmRelease) (rHr *v1.HelmRelease, err error)

Sync synchronizes the given `v1.HelmRelease` with Helm.

func (*Release) Uninstall

func (r *Release) Uninstall(client helm.Client, hr *v1.HelmRelease)

Uninstalls removes the Helm release for the given `v1.HelmRelease`, and the git chart source if present.

Jump to

Keyboard shortcuts

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