action

package

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandFile

func ExpandFile(srcFile, destDir string) (string, error)

ExpandFile expand existed file to destDir

func GarbageCollectCacheChartsFile

func GarbageCollectCacheChartsFile()

GarbageCollectCacheChartsFile clean cache file, including -charts.txt and -index.yaml

func NewSettings

func NewSettings(repoDir string) (*cli.EnvSettings, error)

NewSettings return EnvSettings that describes all of the environment settings.

Types

type ChartPathOptions

type ChartPathOptions struct {
	CaFile   string // --ca-file
	CertFile string // --cert-file
	KeyFile  string // --key-file
	Keyring  string // --keyring
	Password string // --password
	RepoURL  string // --repo
	Username string // --username
	Verify   bool   // --verify
	Version  string // --version

	Chart       string
	ChartRepo   string
	ExistedFile string
}

ChartPathOptions captures common options used for controlling chart paths

func (ChartPathOptions) ApplyTo

func (cp ChartPathOptions) ApplyTo(opt *action.ChartPathOptions)

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client used to manage helm release

func NewClient

func NewClient(helmDriver string, restClientGetter *config.RESTClientGetter) *Client

NewClient return a client that will work on helm release

func (*Client) DependencyUpdate

func (c *Client) DependencyUpdate(chartPath string, getter []getter.Provider, settings *cli.EnvSettings, verify bool, keyring string) error

DependencyUpdate update chart's dependency

func (*Client) History

func (c *Client) History(options *HistoryOptions) (ReleaseHistory, error)

History returning a set of matches.

func (*Client) Install

func (c *Client) Install(options *InstallOptions) (*release.Release, error)

Install installs a chart archive

func (*Client) List

func (c *Client) List(options *ListOptions) ([]*release.Release, error)

List returning a set of matches.

func (*Client) Pull

func (c *Client) Pull(options *PullOptions) (string, error)

Pull is the action for pulling a chart.

func (*Client) Push added in v1.7.0

func (c *Client) Push(options *PushOptions) (existed bool, err error)

Push is the action for pushing a chart.

func (*Client) RepoUpdate added in v1.6.0

func (c *Client) RepoUpdate(options *RepoUpdateOptions) (entries map[string]repo.ChartVersions, err error)

RepoUpdate is the action for chart repo update.

func (*Client) Rollback

func (c *Client) Rollback(options *RollbackOptions) error

Rollback roll back to the previous release.

func (*Client) Show

func (c *Client) Show(options *ShowOptions) (show ShowInfo, err error)

Show installs a chart archive

func (*Client) Status

func (c *Client) Status(options *StatusOptions) (ReleaseStatus, error)

Status returning release status.

func (*Client) Uninstall

func (c *Client) Uninstall(options *UninstallOptions) (*release.UninstallReleaseResponse, error)

Uninstall provides the implementation of 'helm uninstall'.

func (*Client) Upgrade

func (c *Client) Upgrade(options *UpgradeOptions) (*release.Release, error)

Upgrade upgrade a helm release

type HistoryOptions

type HistoryOptions struct {
	Namespace   string
	ReleaseName string
	Max         int
}

HistoryOptions is the query options to a history call.

type InstallOptions

type InstallOptions struct {
	ChartPathOptions

	DryRun           bool
	DependencyUpdate bool
	Timeout          time.Duration
	Namespace        string
	ReleaseName      string
	Description      string
	// Used by helm template to render charts with .Release.IsUpgrade. Ignored if Dry-Run is false
	IsUpgrade bool

	Values map[string]interface{}
}

InstallOptions is the installation options to a install call.

type KubeClient

type KubeClient struct {
	kube.Interface
}

KubeClient represents a client capable of communicating with the Kubernetes API.

func (*KubeClient) GetResource

func (c *KubeClient) GetResource(resources kube.ResourceList) (map[string][]string, error)

GetResource gets Kubernetes resources as pretty-printed string.

Namespace will set the namespace.

type ListOptions

type ListOptions struct {
	// All ignores the limit/offset
	All bool
	// AllNamespaces searches across namespaces
	AllNamespaces bool
	// Overrides the default lexicographic sorting
	ByDate      bool
	SortReverse bool
	// 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
	Short        bool
	Uninstalled  bool
	Superseded   bool
	Uninstalling bool
	Deployed     bool
	Failed       bool
	Pending      bool

	Namespace string
}

ListOptions is the query options to a list call.

type PullOptions

type PullOptions struct {
	ChartPathOptions

	DestDir string
}

PullOptions is the options for pulling a chart.

type PushOptions added in v1.7.0

type PushOptions struct {
	ChartPathOptions

	ChartFile   string
	ForceUpload bool
}

PushOptions is the options for pushing a chart.

type ReleaseHistory

type ReleaseHistory []ReleaseInfo

type ReleaseInfo

type ReleaseInfo struct {
	Revision    int           `json:"revision"`
	Updated     helmtime.Time `json:"updated"`
	Status      string        `json:"status"`
	Chart       string        `json:"chart"`
	AppVersion  string        `json:"app_version"`
	Description string        `json:"description"`
	Manifest    string        `json:"manifest"`
}

type ReleaseStatus

type ReleaseStatus struct {
	Release   *release.Release
	Resources map[string][]string
}

type RepoUpdateOptions added in v1.6.0

type RepoUpdateOptions struct {
	ChartPathOptions
}

RepoUpdateOptions is the options for chart repo update.

type ResourceActorFunc

type ResourceActorFunc func(*resource.Info) error

ResourceActorFunc performs an action on a single resource.

type RollbackOptions

type RollbackOptions struct {
	Namespace   string
	ReleaseName string
	Revision    int64
}

RollbackOptions is the options to a rollback call.

type Show

type Show struct {
	action.Show
	// contains filtered or unexported fields
}

Show is the action for checking a given release's information.

It provides the implementation of 'helm show' and its respective subcommands.

func NewShow

func NewShow(output action.ShowOutputFormat) *Show

NewShow creates a new Show object with the given configuration.

func (*Show) Run

func (s *Show) Run(chartpath string) (map[string]string, error)

Run executes 'helm show' against the given release.

type ShowInfo

type ShowInfo struct {
	Values map[string]string
	Readme map[string]string
	Chart  *chart.Chart
}

ShowInfo is the result of a chart show call.

type ShowOptions

type ShowOptions struct {
	ChartPathOptions
}

ShowOptions is the installation options to a install call.

type StatusOptions

type StatusOptions struct {
	Namespace   string
	ReleaseName string
}

StatusOptions is the query options to a status call.

type UninstallOptions

type UninstallOptions struct {
	DryRun      bool
	KeepHistory bool
	Timeout     time.Duration
	Description string

	ReleaseName string
	Namespace   string
}

UninstallOptions is the option for uninstalling releases.

type UpgradeOptions

type UpgradeOptions struct {
	ChartPathOptions

	// Install is a purely informative flag that indicates whether this upgrade was done in "install" mode.
	//
	// Applications may use this to determine whether this Upgrade operation was done as part of a
	// pure upgrade (Upgrade.Install == false) or as part of an install-or-upgrade operation
	// (Upgrade.Install == true).
	//
	// Setting this to `true` will NOT cause `Upgrade` to perform an install if the release does not exist.
	// That process must be handled by creating an Install action directly. See cmd/upgrade.go for an
	// example of how this flag is used.
	Install     bool
	DryRun      bool
	Timeout     time.Duration
	Namespace   string
	Description string
	// ResetValues will reset the values to the chart's built-ins rather than merging with existing.
	ResetValues bool
	// ReuseValues will re-use the user's last supplied values.
	ReuseValues bool
	// MaxHistory limits the maximum number of revisions saved per release
	MaxHistory int

	DependencyUpdate bool
	ReleaseName      string
	Values           map[string]interface{}
}

UpgradeOptions is the installation options to a install call.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL