release

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRelease

func NewRelease(name, namespace string, revision int, deployType common.DeployType, resources []*spec.ResourceSpec, chart *helmchart.Chart, releaseConfig map[string]interface{}, opts ReleaseOptions) (*helmrelease.Release, error)

Construct Helm release.

func NewReleaseStorage

func NewReleaseStorage(ctx context.Context, namespace, storageDriver string, clientFactory kube.ClientFactorier, opts ReleaseStorageOptions) (*helmstorage.Storage, error)

Constructs Helm release storage driver.

func ReleaseToResourceSpecs

func ReleaseToResourceSpecs(rel *helmrelease.Release, releaseNamespace string, noCleanNullFields bool) ([]*spec.ResourceSpec, error)

Constructs ResourceSpecs from a Release object.

Types

type Historier

type Historier interface {
	Releases() []*helmrelease.Release
	FindAllDeployed() []*helmrelease.Release
	FindRevision(revision int) (rel *helmrelease.Release, found bool)
	CreateRelease(ctx context.Context, rel *helmrelease.Release) error
	UpdateRelease(ctx context.Context, rel *helmrelease.Release) error
	DeleteRelease(ctx context.Context, name string, revision int) error
}

type History

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

Wraps Helm release management for easier use.

func BuildHistories

func BuildHistories(historyStorage ReleaseStorager, opts HistoryOptions) ([]*History, error)

Builds histories for multiple different releases.

func BuildHistory

func BuildHistory(releaseName string, historyStorage ReleaseStorager, opts HistoryOptions) (*History, error)

Builds history for a specific release.

func NewHistory

func NewHistory(rels []*helmrelease.Release, releaseName string, historyStorage ReleaseStorager, opts HistoryOptions) *History

func (*History) CreateRelease

func (h *History) CreateRelease(ctx context.Context, rel *helmrelease.Release) error

func (*History) DeleteRelease

func (h *History) DeleteRelease(ctx context.Context, name string, revision int) error

func (*History) FindAllDeployed

func (h *History) FindAllDeployed() []*helmrelease.Release

func (*History) FindRevision

func (h *History) FindRevision(revision int) (rel *helmrelease.Release, found bool)

func (*History) Releases

func (h *History) Releases() []*helmrelease.Release

func (*History) UpdateRelease

func (h *History) UpdateRelease(ctx context.Context, rel *helmrelease.Release) error

type HistoryOptions

type HistoryOptions struct{}

type IsReleaseUpToDateResult added in v1.27.0

type IsReleaseUpToDateResult struct {
	Reason   ReleaseOutdatedReason
	UpToDate bool
}

func IsReleaseUpToDate

func IsReleaseUpToDate(oldRel, newRel *helmrelease.Release) (IsReleaseUpToDateResult, error)

Check if the new Release is up-to-date compared to the old Release. It doesn't check any resources of the release in the cluster, just compares Release objects.

type ReleaseOptions

type ReleaseOptions struct {
	InfoAnnotations map[string]string
	Labels          map[string]string
	Notes           string
}

type ReleaseOutdatedReason added in v1.27.0

type ReleaseOutdatedReason string
const (
	ReleaseOutdatedReasonNone                     ReleaseOutdatedReason = ""
	ReleaseOutdatedReasonNoPreviousRelease        ReleaseOutdatedReason = "there is no previously deployed release"
	ReleaseOutdatedReasonReleaseStatusNotDeployed ReleaseOutdatedReason = "the previously deployed release was not successful"
	ReleaseOutdatedReasonNotesChanged             ReleaseOutdatedReason = "the release notes changed"
	ReleaseOutdatedReasonValuesChanged            ReleaseOutdatedReason = "the release values changed"
	ReleaseOutdatedReasonHooksChanged             ReleaseOutdatedReason = "the release hooks changed"
	ReleaseOutdatedReasonManifestsChanged         ReleaseOutdatedReason = "the release manifests changed"
)

type ReleaseStorageOptions

type ReleaseStorageOptions struct {
	HistoryLimit  int
	SQLConnection string
}

type ReleaseStorager

type ReleaseStorager interface {
	Create(rls *helmrelease.Release) error
	Update(rls *helmrelease.Release) error
	Delete(name string, version int) (*helmrelease.Release, error)
	Query(labels map[string]string) ([]*helmrelease.Release, error)
}

Minimal interface for Helm storage drivers.

Jump to

Keyboard shortcuts

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