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 ¶
- Variables
- type Backend
- func (b *Backend) Apply(ctx context.Context, c backend.Component) (backend.State, error)
- func (b *Backend) Name() string
- func (b *Backend) Render(c backend.Component) (*helmv2.HelmRelease, error)
- func (b *Backend) RenderSource(c backend.Component) (*unstructured.Unstructured, error)
- func (b *Backend) Rollback(context.Context, backend.Component, int) (backend.State, error)
- func (b *Backend) Status(ctx context.Context, c backend.Component) (backend.State, error)
- func (b *Backend) Uninstall(ctx context.Context, c backend.Component) error
Constants ¶
This section is empty.
Variables ¶
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) Render ¶
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.