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
- type Backend
- func (b *Backend) Apply(ctx context.Context, c backend.Component) (backend.State, error)
- func (b *Backend) Name() string
- func (b *Backend) Release(namespace, name string) (*ReleaseInfo, error)
- func (b *Backend) Rollback(ctx context.Context, c backend.Component, toRevision int) (backend.State, error)
- func (b *Backend) Status(_ context.Context, c backend.Component) (backend.State, error)
- func (b *Backend) Uninstall(_ context.Context, c backend.Component) error
- type ReleaseInfo
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 (*Backend) Apply ¶
Apply installs or upgrades the release and waits until it is ready or the timeout passes.
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.
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.
Click to show internal directories.
Click to hide internal directories.