helm

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package helm is the backend that installs charts with the Helm SDK inside the operator. It needs nothing else in the cluster.

Index

Constants

View Source
const DefaultTimeout = 10 * time.Minute

DefaultTimeout applies when a component sets none.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {

	// MaxHistory bounds stored Helm revisions per release. It must exceed
	// the PackageRevision history, or rollbacks would target pruned releases.
	MaxHistory int
	Logger     *slog.Logger
	// contains filtered or unexported fields
}

Backend runs Helm actions in-process.

func New

func New(cfg *rest.Config) (*Backend, error)

New returns a Helm backend talking to the cluster in cfg.

func (*Backend) Apply

func (b *Backend) Apply(ctx context.Context, c backend.Component) (backend.State, error)

Apply installs or upgrades the release and waits until it is ready or the timeout passes.

func (*Backend) Name

func (b *Backend) Name() string

Name implements backend.Backend.

func (*Backend) Release

func (b *Backend) Release(namespace, name string) (*ReleaseInfo, error)

Release reads the Helm release namespace/name; nil when there is none.

func (*Backend) Rollback

func (b *Backend) Rollback(ctx context.Context, c backend.Component, toRevision int) (backend.State, error)

Rollback returns the release to an earlier Helm revision and waits for it.

func (*Backend) Status

Status reports the latest release revision.

func (*Backend) Uninstall

func (b *Backend) Uninstall(_ context.Context, c backend.Component) error

Uninstall removes the release; a missing release is fine.

type ReleaseInfo

type ReleaseInfo struct {
	Chart, ChartVersion, AppVersion string
	Revision                        int
	Status                          string
	// Values are the values the release was given, not the chart's
	// defaults.
	Values map[string]any
	// ManagedBy is the package label, empty for a release kubepkg did not
	// install.
	ManagedBy string
}

ReleaseInfo is what an existing Helm release holds.

Jump to

Keyboard shortcuts

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