Documentation
¶
Overview ¶
Package helmx wraps the helm CLI: chart index queries, upgrades, and the release introspection that `flow cluster status` and `history` render.
Index ¶
- type ChartVersion
- type Helm
- func (h *Helm) Available() bool
- func (h *Helm) GetValues(ctx context.Context, release, namespace, kubeContext string) (string, error)
- func (h *Helm) HasVersion(ctx context.Context, repo, chart, version string) (bool, error)
- func (h *Helm) History(ctx context.Context, release, namespace, kubeContext string) ([]Revision, error)
- func (h *Helm) ListRepos(ctx context.Context) ([]Repo, error)
- func (h *Helm) Rollback(ctx context.Context, release, namespace, kubeContext string, revision int) error
- func (h *Helm) SearchVersions(ctx context.Context, repo, chart string) ([]ChartVersion, error)
- func (h *Helm) Status(ctx context.Context, release, namespace, kubeContext string) (Release, error)
- func (h *Helm) Uninstall(ctx context.Context, release, namespace, kubeContext string, keepHistory bool) error
- func (h *Helm) UpdateRepo(ctx context.Context, repo string) error
- func (h *Helm) Upgrade(ctx context.Context, o UpgradeOptions) error
- func (h *Helm) Version(ctx context.Context) (string, error)
- type Release
- type Repo
- type Revision
- type UpgradeOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChartVersion ¶
type ChartVersion struct {
Name string `json:"name"`
Version string `json:"version"`
AppVersion string `json:"app_version"`
Description string `json:"description"`
}
ChartVersion is one row from `helm search repo --versions`.
type Helm ¶
Helm wraps the helm binary.
func (*Helm) GetValues ¶
func (h *Helm) GetValues(ctx context.Context, release, namespace, kubeContext string) (string, error)
GetValues returns the values actually deployed for a release.
func (*Helm) HasVersion ¶
HasVersion reports whether a specific version is present in the index.
func (*Helm) History ¶
func (h *Helm) History(ctx context.Context, release, namespace, kubeContext string) ([]Revision, error)
History returns the release's revision history, newest last.
func (*Helm) Rollback ¶
func (h *Helm) Rollback(ctx context.Context, release, namespace, kubeContext string, revision int) error
Rollback reverts a release to a previous revision. Revision 0 means the immediately previous one, which is helm's own default.
func (*Helm) SearchVersions ¶
SearchVersions lists every published version of a chart, including pre-releases: the alpha chart versions CI publishes are all pre-releases, so --devel is mandatory here.
func (*Helm) Uninstall ¶
func (h *Helm) Uninstall(ctx context.Context, release, namespace, kubeContext string, keepHistory bool) error
Uninstall removes a release.
func (*Helm) UpdateRepo ¶
UpdateRepo refreshes one chart repository's index.
type Release ¶
type Release struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Revision int `json:"revision"`
Status string `json:"status"`
LastDeployed time.Time `json:"last_deployed"`
ChartVersion string `json:"chart_version"`
AppVersion string `json:"app_version"`
Description string `json:"description"`
}
Release is the summary `helm status -o json` provides.
type Revision ¶
type Revision struct {
Revision int `json:"revision"`
Updated time.Time `json:"updated"`
Status string `json:"status"`
Chart string `json:"chart"`
AppVersion string `json:"app_version"`
Description string `json:"description"`
}
Revision is one row of `helm history`.
type UpgradeOptions ¶
type UpgradeOptions struct {
Release string
Chart string
Namespace string
Version string
KubeContext string
ValuesFiles []string
SetValues []string
ExtraArgs []string
Install bool
Wait bool
Atomic bool
CreateNS bool
Timeout string
DryRun bool
}
UpgradeOptions describes a `helm upgrade` invocation.
func (UpgradeOptions) CommandLine ¶
func (o UpgradeOptions) CommandLine(bin string) string
CommandLine renders the upgrade as a copy-pasteable shell command.
func (UpgradeOptions) UpgradeArgs ¶
func (o UpgradeOptions) UpgradeArgs() []string
UpgradeArgs renders the full argv. It is exported so the command can print the exact invocation before running it — the printed line and the executed command can then never disagree.