The Client interface provides the primary programmatic way to interact with Helm releases. It supports standard Helm operations like installing, upgrading, rolling back, and uninstalling releases, as well as retrieving the last known release state and pulling/loading charts from repositories.
Methods available on the Client interface:
GetLastRelease(release string) (*release.Release, error): Retrieves the most recent release information for the specified name.Install(release string, chart *chart.Chart, vals map[string]interface{}, patches []ktype.Patch) (*release.Release, error): Installs a new Helm release using the provided chart, values, and optional Kustomize patches.Upgrade(release string, chart *chart.Chart, vals map[string]interface{}, patches []ktype.Patch) (*release.Release, error): Upgrades an existing release. Note that Upgrade resets values so the CR remains the source of truth.Rollback(release string) error: Rolls back the specified release to its previous state.Uninstall(release string) error: Uninstalls the specified release.PullAndLoadChart(mg resource.Managed, creds *RepoCreds) (*chart.Chart, error): Pulls a chart from a repository (supporting both classic HTTP/S and OCI registries) and loads it into a *chart.Chart object.
type Client interface {
GetLastRelease(release string) (*release.Release, error)
Install(release string, chart *chart.Chart, vals map[string]interface{}, patches []ktype.Patch) (*release.Release, error)
Upgrade(release string, chart *chart.Chart, vals map[string]interface{}, patches []ktype.Patch) (*release.Release, error)
Rollback(release string) error
Uninstall(release string) error
PullAndLoadChart(mg resource.Managed, creds *RepoCreds) (*chart.Chart, error)
}