flux

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: 15 Imported by: 0

Documentation

Overview

Package flux is the backend that installs through Flux: for every component it writes the chart's source (an OCIRepository for charts in a registry, a HelmRepository otherwise) and a HelmRelease, and lets source-controller and helm-controller do the rest. It needs only Flux in the cluster.

Index

Constants

This section is empty.

Variables

View Source
var ErrRollbackUnsupported = errors.New("the flux backend cannot roll back to an earlier revision")

ErrRollbackUnsupported is returned by Rollback. Flux keeps no earlier chart artifacts to return to, so packages applied through Flux are recovered by a forward fix.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Client client.Client
	// Insecure lets source-controller pull from registries over plain HTTP.
	Insecure      bool
	Interval      time.Duration
	RetryInterval time.Duration
	MaxHistory    int
}

Backend writes chart sources and HelmReleases.

func (*Backend) Apply

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

Apply writes the chart source and the HelmRelease.

func (*Backend) Name

func (b *Backend) Name() string

Name implements backend.Backend.

func (*Backend) Render

func (b *Backend) Render(c backend.Component) (*helmv2.HelmRelease, error)

Render builds the HelmRelease for a component. Exported for the CLI's render command and for tests.

func (*Backend) RenderSource

func (b *Backend) RenderSource(c backend.Component) (*unstructured.Unstructured, error)

Apply creates or updates the HelmRelease. It preserves labels, annotations and suspend set by others, because operators of a cluster suspend releases by hand during incidents. RenderSource builds the Flux source of a component's chart: an OCIRepository selecting the Helm chart layer, or a HelmRepository. Exported for the render command.

func (*Backend) Rollback

Rollback is not supported by this backend.

func (*Backend) Status

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

Status reads the HelmRelease conditions.

func (*Backend) Uninstall

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

Uninstall deletes the HelmRelease, which helm-controller uninstalls, and the chart source.

Jump to

Keyboard shortcuts

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