Documentation ¶
Overview ¶
Package action contains the logic for each action that Helm can perform.
This is a library for calling top-level Helm actions like 'install', 'upgrade', or 'list'. Actions approximately match the command line invocations that the Helm client uses.
Index ¶
Constants ¶
const ListAll = ListDeployed | ListUninstalled | ListUninstalling | ListPendingInstall | ListPendingRollback | ListPendingUpgrade | ListSuperseded | ListFailed
ListAll is a convenience for enabling all list filters
Variables ¶
var Timestamper = time.Now
Timestamper is a function capable of producing a timestamp.Timestamper.
By default, this is a time.Time function. This can be overridden for testing, though, so that timestamps are predictable.
Functions ¶
func GetVersionSet ¶
func GetVersionSet(client discovery.ServerGroupsInterface) (chartutil.VersionSet, error)
GetVersionSet retrieves a set of available k8s API versions
Types ¶
type ChartExport ¶
type ChartExport struct {
// contains filtered or unexported fields
}
ChartExport performs a chart export operation.
func NewChartExport ¶
func NewChartExport(cfg *Configuration) *ChartExport
NewChartExport creates a new ChartExport object with the given configuration.
type ChartList ¶
type ChartList struct {
// contains filtered or unexported fields
}
ChartList performs a chart list operation.
func NewChartList ¶
func NewChartList(cfg *Configuration) *ChartList
NewChartList creates a new ChartList object with the given configuration.
type ChartPull ¶
type ChartPull struct {
// contains filtered or unexported fields
}
ChartPull performs a chart pull operation.
func NewChartPull ¶
func NewChartPull(cfg *Configuration) *ChartPull
NewChartPull creates a new ChartPull object with the given configuration.
type ChartPush ¶
type ChartPush struct {
// contains filtered or unexported fields
}
ChartPush performs a chart push operation.
func NewChartPush ¶
func NewChartPush(cfg *Configuration) *ChartPush
NewChartPush creates a new ChartPush object with the given configuration.
type ChartRemove ¶
type ChartRemove struct {
// contains filtered or unexported fields
}
ChartRemove performs a chart remove operation.
func NewChartRemove ¶
func NewChartRemove(cfg *Configuration) *ChartRemove
NewChartRemove creates a new ChartRemove object with the given configuration.
type ChartSave ¶
type ChartSave struct {
// contains filtered or unexported fields
}
ChartSave performs a chart save operation.
func NewChartSave ¶
func NewChartSave(cfg *Configuration) *ChartSave
NewChartSave creates a new ChartSave object with the given configuration.
type Configuration ¶
type Configuration struct { // Discovery contains a discovery client Discovery discovery.DiscoveryInterface // Releases stores records of releases. Releases *storage.Storage // KubeClient is a Kubernetes API client. KubeClient environment.KubeClient // RegistryClient is a client for working with registries RegistryClient *registry.Client Capabilities *chartutil.Capabilities Log func(string, ...interface{}) }
Configuration injects the dependencies that all actions share.
func (*Configuration) Now ¶
func (c *Configuration) Now() time.Time
Now generates a timestamp
If the configuration has a Timestamper on it, that will be used. Otherwise, this will use time.Now().
type Install ¶
type Install struct { DryRun bool DisableHooks bool Replace bool Wait bool Devel bool DepUp bool Timeout int64 Namespace string ReleaseName string // contains filtered or unexported fields }
Install performs an installation operation.
func NewInstall ¶
func NewInstall(cfg *Configuration) *Install
NewInstall creates a new Install object with the given configuration.
type List ¶
type List struct { // All ignores the limit/offset All bool // AllNamespaces searches across namespaces AllNamespaces bool // Sort indicates the sort to use // // see pkg/releaseutil for several useful sorters Sort Sorter // StateMask accepts a bitmask of states for items to show. // The default is ListDeployed StateMask ListStates // Limit is the number of items to return per Run() Limit int // Offset is the starting index for the Run() call Offset int // Filter is a filter that is applied to the results Filter string // contains filtered or unexported fields }
List is the action for listing releases.
It provides, for example, the implementation of 'helm list'.
type ListStates ¶
type ListStates uint
ListStates represents zero or more status codes that a list item may have set
Because this is used as a bitmask filter, more than one one bit can be flipped in the ListStates.
const ( // ListDeployed filters on status "deployed" ListDeployed ListStates = 1 << iota // ListUninstalled filters on status "uninstalled" ListUninstalled // ListUninstalling filters on status "uninstalling" (uninstall in progress) ListUninstalling // ListPendingInstall filters on status "pending" (deployment in progress) ListPendingInstall // ListPendingUpgrade filters on status "pending_upgrade" (upgrade in progress) ListPendingUpgrade // ListPendingRollback filters on status "pending_rollback" (rollback in progres) ListPendingRollback // ListSuperseded filters on status "superseded" (historical release version that is no longer deployed) ListSuperseded // ListFailed filters on status "failed" (release version not deployed because of error) ListFailed // ListUnknown filters on an unknown status ListUnknown )
func (ListStates) FromName ¶
func (s ListStates) FromName(str string) ListStates
FromName takes a state name and returns a ListStates representation.
Currently, there are only names for individual flipped bits, so the returned ListStates will only match one of the constants. However, it is possible that this behavior could change in the future.