Documentation
¶
Index ¶
- Variables
- func ReleaseMock(opts *MockReleaseOptions) *release.Release
- type Client
- func (c *Client) GetTiller() *tiller.ReleaseServer
- func (c *Client) InstallRelease(chstr, ns string, opts ...InstallOption) (*release.Release, error)
- func (c *Client) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ...InstallOption) (*release.Release, error)
- func (c *Client) Option(opts ...Option) *Client
- func (c *Client) ReleaseContent(name string, version int) (*release.Release, error)
- func (c *Client) ReleaseHistory(rlsName string, max int) ([]*release.Release, error)
- func (c *Client) ReleaseStatus(rlsName string, version int) (*hapi.GetReleaseStatusResponse, error)
- func (c *Client) RollbackRelease(rlsName string, opts ...RollbackOption) (*release.Release, error)
- func (c *Client) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *hapi.TestReleaseResponse, <-chan error)
- func (c *Client) UninstallRelease(rlsName string, opts ...UninstallOption) (*hapi.UninstallReleaseResponse, error)
- func (c *Client) UpdateRelease(rlsName, chstr string, opts ...UpdateOption) (*release.Release, error)
- func (c *Client) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*release.Release, error)
- type FakeClient
- func (c *FakeClient) InstallRelease(chStr, ns string, opts ...InstallOption) (*release.Release, error)
- func (c *FakeClient) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ...InstallOption) (*release.Release, error)
- func (c *FakeClient) Option(opts ...Option) Interface
- func (c *FakeClient) ReleaseContent(rlsName string, version int) (*release.Release, error)
- func (c *FakeClient) ReleaseHistory(rlsName string, max int) ([]*release.Release, error)
- func (c *FakeClient) ReleaseStatus(rlsName string, version int) (*hapi.GetReleaseStatusResponse, error)
- func (c *FakeClient) RollbackRelease(rlsName string, opts ...RollbackOption) (*release.Release, error)
- func (c *FakeClient) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *hapi.TestReleaseResponse, <-chan error)
- func (c *FakeClient) UninstallRelease(rlsName string, opts ...UninstallOption) (*hapi.UninstallReleaseResponse, error)
- func (c *FakeClient) UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*release.Release, error)
- func (c *FakeClient) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*release.Release, error)
- type InstallOption
- func InstallDisableHooks(disable bool) InstallOption
- func InstallDryRun(dry bool) InstallOption
- func InstallReuseName(reuse bool) InstallOption
- func InstallTimeout(timeout int64) InstallOption
- func InstallWait(wait bool) InstallOption
- func ReleaseName(name string) InstallOption
- func ValueOverrides(raw map[string]interface{}) InstallOption
- type Interface
- type MockReleaseOptions
- type Option
- type ReleaseTestOption
- type RollbackOption
- func RollbackDisableHooks(disable bool) RollbackOption
- func RollbackDryRun(dry bool) RollbackOption
- func RollbackForce(force bool) RollbackOption
- func RollbackRecreate(recreate bool) RollbackOption
- func RollbackTimeout(timeout int64) RollbackOption
- func RollbackVersion(ver int) RollbackOption
- func RollbackWait(wait bool) RollbackOption
- type UninstallOption
- type UpdateOption
- func MaxHistory(maxHistory int) UpdateOption
- func ResetValues(reset bool) UpdateOption
- func ReuseValues(reuse bool) UpdateOption
- func UpdateValueOverrides(raw map[string]interface{}) UpdateOption
- func UpgradeDisableHooks(disable bool) UpdateOption
- func UpgradeDryRun(dry bool) UpdateOption
- func UpgradeForce(force bool) UpdateOption
- func UpgradeRecreate(recreate bool) UpdateOption
- func UpgradeTimeout(timeout int64) UpdateOption
- func UpgradeWait(wait bool) UpdateOption
Constants ¶
This section is empty.
Variables ¶
var MockHookTemplate = `apiVersion: v1
kind: Job
metadata:
annotations:
"helm.sh/hook": pre-install
`
MockHookTemplate is the hook template used for all mock release objects.
var MockManifest = `apiVersion: v1
kind: Secret
metadata:
name: fixture
`
MockManifest is the manifest used for all mock release objects.
Functions ¶
func ReleaseMock ¶
func ReleaseMock(opts *MockReleaseOptions) *release.Release
ReleaseMock creates a mock release object based on options set by MockReleaseOptions. This function should typically not be used outside of testing.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages client side of the Helm-Tiller protocol.
func (*Client) GetTiller ¶
func (c *Client) GetTiller() *tiller.ReleaseServer
func (*Client) InstallRelease ¶
InstallRelease loads a chart from chstr, installs it, and returns the release response.
func (*Client) InstallReleaseFromChart ¶
func (c *Client) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ...InstallOption) (*release.Release, error)
InstallReleaseFromChart installs a new chart and returns the release response.
func (*Client) ReleaseContent ¶
ReleaseContent returns the configuration for a given release.
func (*Client) ReleaseHistory ¶
ReleaseHistory returns a release's revision history.
func (*Client) ReleaseStatus ¶
ReleaseStatus returns the given release's status.
func (*Client) RollbackRelease ¶
RollbackRelease rolls back a release to the previous version.
func (*Client) RunReleaseTest ¶
func (c *Client) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *hapi.TestReleaseResponse, <-chan error)
RunReleaseTest executes a pre-defined test on a release.
func (*Client) UninstallRelease ¶
func (c *Client) UninstallRelease(rlsName string, opts ...UninstallOption) (*hapi.UninstallReleaseResponse, error)
UninstallRelease uninstalls a named release and returns the response.
func (*Client) UpdateRelease ¶
func (c *Client) UpdateRelease(rlsName, chstr string, opts ...UpdateOption) (*release.Release, error)
UpdateRelease loads a chart from chstr and updates a release to a new/different chart.
func (*Client) UpdateReleaseFromChart ¶
func (c *Client) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*release.Release, error)
UpdateReleaseFromChart updates a release to a new/different chart.
type FakeClient ¶
type FakeClient struct { Rels []*release.Release TestRunStatus map[string]release.TestRunStatus Opts options }
FakeClient implements Interface
func (*FakeClient) InstallRelease ¶
func (c *FakeClient) InstallRelease(chStr, ns string, opts ...InstallOption) (*release.Release, error)
InstallRelease creates a new release and returns the release
func (*FakeClient) InstallReleaseFromChart ¶
func (c *FakeClient) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ...InstallOption) (*release.Release, error)
InstallReleaseFromChart adds a new MockRelease to the fake client and returns the release
func (*FakeClient) Option ¶
func (c *FakeClient) Option(opts ...Option) Interface
Option returns the fake release client
func (*FakeClient) ReleaseContent ¶
ReleaseContent returns the configuration for the matching release name in the fake release client.
func (*FakeClient) ReleaseHistory ¶
ReleaseHistory returns a release's revision history.
func (*FakeClient) ReleaseStatus ¶
func (c *FakeClient) ReleaseStatus(rlsName string, version int) (*hapi.GetReleaseStatusResponse, error)
ReleaseStatus returns a release status response with info from the matching release name.
func (*FakeClient) RollbackRelease ¶
func (c *FakeClient) RollbackRelease(rlsName string, opts ...RollbackOption) (*release.Release, error)
RollbackRelease returns nil, nil
func (*FakeClient) RunReleaseTest ¶
func (c *FakeClient) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *hapi.TestReleaseResponse, <-chan error)
RunReleaseTest executes a pre-defined tests on a release
func (*FakeClient) UninstallRelease ¶
func (c *FakeClient) UninstallRelease(rlsName string, opts ...UninstallOption) (*hapi.UninstallReleaseResponse, error)
UninstallRelease uninstalls a release from the FakeClient
func (*FakeClient) UpdateRelease ¶
func (c *FakeClient) UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*release.Release, error)
UpdateRelease returns the updated release, if it exists
func (*FakeClient) UpdateReleaseFromChart ¶
func (c *FakeClient) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*release.Release, error)
UpdateReleaseFromChart returns the updated release, if it exists
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 Helm to re-use an existing name.
func InstallTimeout ¶
func InstallTimeout(timeout int64) InstallOption
InstallTimeout specifies the number of seconds before kubernetes calls timeout
func InstallWait ¶
func InstallWait(wait bool) InstallOption
InstallWait specifies whether or not to wait for all resources to be ready
func ReleaseName ¶
func ReleaseName(name string) InstallOption
ReleaseName specifies the name of the release when installing.
func ValueOverrides ¶
func ValueOverrides(raw map[string]interface{}) InstallOption
ValueOverrides specifies a list of values to include when installing.
type Interface ¶
type Interface interface { InstallRelease(chStr, namespace string, opts ...InstallOption) (*release.Release, error) InstallReleaseFromChart(chart *chart.Chart, namespace string, opts ...InstallOption) (*release.Release, error) UninstallRelease(rlsName string, opts ...UninstallOption) (*hapi.UninstallReleaseResponse, error) ReleaseStatus(rlsName string, version int) (*hapi.GetReleaseStatusResponse, error) UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*release.Release, error) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*release.Release, error) RollbackRelease(rlsName string, opts ...RollbackOption) (*release.Release, error) ReleaseContent(rlsName string, version int) (*release.Release, error) ReleaseHistory(rlsName string, max int) ([]*release.Release, error) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *hapi.TestReleaseResponse, <-chan error) }
Interface for helm client for mocking in tests
type MockReleaseOptions ¶
type MockReleaseOptions struct { Name string Version int Chart *chart.Chart Status release.Status Namespace string }
MockReleaseOptions allows for user-configurable options on mock release objects.
type Option ¶
type Option func(*options)
Option allows specifying various settings configurable by the helm client user for overriding the defaults.
func BeforeCall ¶
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 Discovery ¶
func Discovery(dc discovery.DiscoveryInterface) Option
Discovery sets the discovery interface
func KubeClient ¶
func KubeClient(kc environment.KubeClient) Option
KubeClient sets the cluster environment
type ReleaseTestOption ¶
type ReleaseTestOption func(*options)
ReleaseTestOption allows configuring optional request data for issuing a TestRelease rpc.
func ReleaseTestCleanup ¶
func ReleaseTestCleanup(cleanup bool) ReleaseTestOption
ReleaseTestCleanup is a boolean value representing whether to cleanup test pods
func ReleaseTestTimeout ¶
func ReleaseTestTimeout(timeout int64) ReleaseTestOption
ReleaseTestTimeout specifies the number of seconds before kubernetes calls timeout
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 RollbackForce ¶
func RollbackForce(force bool) RollbackOption
RollbackForce will (if true) force resource update through uninstall/recreate if needed
func RollbackRecreate ¶
func RollbackRecreate(recreate bool) RollbackOption
RollbackRecreate will (if true) recreate pods after rollback.
func RollbackTimeout ¶
func RollbackTimeout(timeout int64) RollbackOption
RollbackTimeout specifies the number of seconds before kubernetes calls timeout
func RollbackVersion ¶
func RollbackVersion(ver int) RollbackOption
RollbackVersion sets the version of the release to deploy.
func RollbackWait ¶
func RollbackWait(wait bool) RollbackOption
RollbackWait specifies whether or not to wait for all resources to be ready
type UninstallOption ¶
type UninstallOption func(*options)
UninstallOption allows setting optional attributes when performing a UninstallRelease tiller rpc.
func UninstallDisableHooks ¶
func UninstallDisableHooks(disable bool) UninstallOption
UninstallDisableHooks will disable hooks for a deletion operation.
func UninstallDryRun ¶
func UninstallDryRun(dry bool) UninstallOption
UninstallDryRun will (if true) execute a deletion as a dry run.
func UninstallPurge ¶
func UninstallPurge(purge bool) UninstallOption
UninstallPurge removes the release from the store and make its name free for later use.
func UninstallTimeout ¶
func UninstallTimeout(timeout int64) UninstallOption
UninstallTimeout specifies the number of seconds before kubernetes calls timeout
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 MaxHistory ¶
func MaxHistory(maxHistory int) UpdateOption
MaxHistory limits the maximum number of revisions saved per release
func ResetValues ¶
func ResetValues(reset bool) UpdateOption
ResetValues will (if true) trigger resetting the values to their original state.
func ReuseValues ¶
func ReuseValues(reuse bool) UpdateOption
ReuseValues will cause Helm to reuse the values from the last release. This is ignored if ResetValues is true.
func UpdateValueOverrides ¶
func UpdateValueOverrides(raw map[string]interface{}) 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.
func UpgradeForce ¶
func UpgradeForce(force bool) UpdateOption
UpgradeForce will (if true) force resource update through uninstall/recreate if needed
func UpgradeRecreate ¶
func UpgradeRecreate(recreate bool) UpdateOption
UpgradeRecreate will (if true) recreate pods after upgrade.
func UpgradeTimeout ¶
func UpgradeTimeout(timeout int64) UpdateOption
UpgradeTimeout specifies the number of seconds before kubernetes calls timeout
func UpgradeWait ¶
func UpgradeWait(wait bool) UpdateOption
UpgradeWait specifies whether or not to wait for all resources to be ready
Directories
¶
Path | Synopsis |
---|---|
Package environment describes the operating environment for Tiller.
|
Package environment describes the operating environment for Tiller. |