helm

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext() context.Context

NewContext creates a versioned context.

Types

type Client

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

Client manages client side of the helm-tiller protocol

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client.

func (*Client) DeleteRelease

func (h *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error)

DeleteRelease uninstalls a named release and returns the response.

func (*Client) GetVersion

func (h *Client) GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, error)

GetVersion returns the server version

func (*Client) InstallRelease

func (h *Client) InstallRelease(chstr, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error)

InstallRelease installs a new chart and returns the release response.

func (*Client) ListReleases

func (h *Client) ListReleases(opts ...ReleaseListOption) (*rls.ListReleasesResponse, error)

ListReleases lists the current releases.

func (*Client) Option

func (h *Client) Option(opts ...Option) *Client

Option configures the helm client with the provided options

func (*Client) ReleaseContent

func (h *Client) ReleaseContent(rlsName string, opts ...ContentOption) (*rls.GetReleaseContentResponse, error)

ReleaseContent returns the configuration for a given release.

func (*Client) ReleaseHistory

func (h *Client) ReleaseHistory(rlsName string, opts ...HistoryOption) (*rls.GetHistoryResponse, error)

ReleaseHistory returns a release's revision history.

func (*Client) ReleaseStatus

func (h *Client) ReleaseStatus(rlsName string, opts ...StatusOption) (*rls.GetReleaseStatusResponse, error)

ReleaseStatus returns the given release's status.

func (*Client) RollbackRelease

func (h *Client) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error)

RollbackRelease rolls back a release to the previous version

func (*Client) UpdateRelease

func (h *Client) UpdateRelease(rlsName string, chstr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error)

UpdateRelease updates a release to a new/different chart

type ContentOption

type ContentOption func(*options)

ContentOption allows setting optional attributes when performing a GetReleaseContent tiller rpc.

func ContentReleaseVersion

func ContentReleaseVersion(version int32) ContentOption

ContentReleaseVersion will instruct Tiller to retrieve the content of a paritcular version of a release.

type DeleteOption

type DeleteOption func(*options)

DeleteOption allows setting optional attributes when performing a UninstallRelease tiller rpc.

func DeleteDisableHooks

func DeleteDisableHooks(disable bool) DeleteOption

DeleteDisableHooks will disable hooks for a deletion operation.

func DeleteDryRun

func DeleteDryRun(dry bool) DeleteOption

DeleteDryRun will (if true) execute a deletion as a dry run.

func DeletePurge

func DeletePurge(purge bool) DeleteOption

DeletePurge removes the release from the store and make its name free for later use.

type HistoryOption

type HistoryOption func(*options)

HistoryOption allows configuring optional request data for issuing a GetHistory rpc.

func WithMaxHistory

func WithMaxHistory(max int32) HistoryOption

WithMaxHistory sets the max number of releases to return in a release history query.

type InstallOption

type InstallOption func(*options)

InstallOption allows specifying various settings configurable by the helm client user for overriding the defaults used when running the `helm install` command.

func InstallDisableHooks

func InstallDisableHooks(disable bool) InstallOption

InstallDisableHooks disables hooks during installation.

func InstallDryRun

func InstallDryRun(dry bool) InstallOption

InstallDryRun will (if true) execute an installation as a dry run.

func InstallReuseName

func InstallReuseName(reuse bool) InstallOption

InstallReuseName will (if true) instruct Tiller to re-use an existing name.

func ReleaseName

func ReleaseName(name string) InstallOption

ReleaseName specifies the name of the release when installing.

func ValueOverrides

func ValueOverrides(raw []byte) InstallOption

ValueOverrides specifies a list of values to include when installing.

type Interface

type Interface interface {
	ListReleases(opts ...ReleaseListOption) (*rls.ListReleasesResponse, error)
	InstallRelease(chStr, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error)
	DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error)
	ReleaseStatus(rlsName string, opts ...StatusOption) (*rls.GetReleaseStatusResponse, error)
	UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error)
	RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error)
	ReleaseContent(rlsName string, opts ...ContentOption) (*rls.GetReleaseContentResponse, error)
	ReleaseHistory(rlsName string, opts ...HistoryOption) (*rls.GetHistoryResponse, error)
	GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, error)
}

Interface for helm client for mocking in tests

type Option

type Option func(*options)

Option allows specifying various settings configurable by the helm client user for overriding the defaults used when issuing rpc's to the Tiller release server.

func BeforeCall

func BeforeCall(fn func(context.Context, proto.Message) error) Option

BeforeCall returns an option that allows intercepting a helm client rpc before being sent OTA to tiller. The intercepting function should return an error to indicate that the call should not proceed or nil otherwise.

func Host

func Host(host string) Option

Host specifies the host address of the Tiller release server, (default = ":44134").

type ReleaseListOption

type ReleaseListOption func(*options)

ReleaseListOption allows specifying various settings configurable by the helm client user for overriding the defaults used when running the `helm list` command.

func ReleaseListFilter

func ReleaseListFilter(filter string) ReleaseListOption

ReleaseListFilter specifies a filter to apply a list of releases.

func ReleaseListLimit

func ReleaseListLimit(limit int) ReleaseListOption

ReleaseListLimit set an upper bound on the number of releases returned.

func ReleaseListOffset

func ReleaseListOffset(offset string) ReleaseListOption

ReleaseListOffset specifies the offset into a list of releases.

func ReleaseListOrder

func ReleaseListOrder(order int32) ReleaseListOption

ReleaseListOrder specifies how to order a list of releases.

func ReleaseListSort

func ReleaseListSort(sort int32) ReleaseListOption

ReleaseListSort specifies how to sort a release list.

func ReleaseListStatuses

func ReleaseListStatuses(statuses []release.Status_Code) ReleaseListOption

ReleaseListStatuses specifies which status codes should be returned.

type RollbackOption

type RollbackOption func(*options)

RollbackOption allows specififying various settings configurable by the helm client user for overriding the defaults used when running the `helm rollback` command.

func RollbackDisableHooks

func RollbackDisableHooks(disable bool) RollbackOption

RollbackDisableHooks will disable hooks for a rollback operation

func RollbackDryRun

func RollbackDryRun(dry bool) RollbackOption

RollbackDryRun will (if true) execute a rollback as a dry run.

func RollbackVersion

func RollbackVersion(ver int32) RollbackOption

RollbackVersion sets the version of the release to deploy.

type StatusOption

type StatusOption func(*options)

StatusOption allows setting optional attributes when performing a GetReleaseStatus tiller rpc.

func StatusReleaseVersion

func StatusReleaseVersion(version int32) StatusOption

StatusReleaseVersion will instruct Tiller to retrieve the status of a particular version of a release.

type UpdateOption

type UpdateOption func(*options)

UpdateOption allows specifying various settings configurable by the helm client user for overriding the defaults used when running the `helm upgrade` command.

func UpdateValueOverrides

func UpdateValueOverrides(raw []byte) UpdateOption

UpdateValueOverrides specifies a list of values to include when upgrading

func UpgradeDisableHooks

func UpgradeDisableHooks(disable bool) UpdateOption

UpgradeDisableHooks will disable hooks for an upgrade operation.

func UpgradeDryRun

func UpgradeDryRun(dry bool) UpdateOption

UpgradeDryRun will (if true) execute an upgrade as a dry run.

type VersionOption

type VersionOption func(*options)

VersionOption -- TODO

Jump to

Keyboard shortcuts

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