Documentation
¶
Index ¶
- Constants
- func NewRepository(config Config) (*clusterRepository, error)
- func Render(p RenderParameters) ([]byte, error)
- type Client
- func (c *Client) Close() error
- func (c *Client) Get(name string) (*Release, error)
- func (c *Client) Install(p InstallParameters) (*Release, error)
- func (c *Client) List(p ListParameters) ([]Release, error)
- func (c *Client) Revisions(name string) ([]Release, error)
- func (c *Client) Rollback(p RollbackParameters) (*Release, error)
- func (c *Client) Uninstall(name string) (*Release, error)
- func (c *Client) Upgrade(p UpgradeParameters) (*Release, error)
- type ClientConfig
- type Config
- type InstallParameters
- type ListParameters
- type Release
- type RenderParameters
- type Repository
- type RollbackParameters
- type UpgradeParameters
Constants ¶
const (
// BackendLocal represents cluster-local chart repository backend.
BackendLocal = "local"
)
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
NewRepository returns a new cluster chart repository.
func Render ¶
func Render(p RenderParameters) ([]byte, error)
RenderHelm renders templates of a provided Helm chart.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Helm client.
func NewClient ¶
func NewClient(conf ClientConfig) (*Client, error)
NewClient returns a new Helm client instance.
func (*Client) Install ¶
func (c *Client) Install(p InstallParameters) (*Release, error)
Install installs a Helm chart and returns release information.
func (*Client) List ¶
func (c *Client) List(p ListParameters) ([]Release, error)
List returns list of releases matching provided parameters.
func (*Client) Rollback ¶
func (c *Client) Rollback(p RollbackParameters) (*Release, error)
Rollback rolls back a release to the specified version.
type ClientConfig ¶
type ClientConfig struct {
// DNSAddress is an optional in-cluster DNS address.
DNSAddress string
}
ClientConfig is the Helm client configuration.
type Config ¶
type Config struct {
// Packages is the cluster package service.
Packages pack.PackageService
// Backend is the cluster backend.
Backend storage.Backend
}
Config is the chart repository configuration.
type InstallParameters ¶
type InstallParameters struct {
// Path is the Helm chart path.
Path string
// Values is a list of YAML files with values.
Values []string
// Set is a list of values set on the CLI.
Set []string
// Name is an optional release name.
Name string
// Namespace is a namespace to install release into.
Namespace string
}
InstallParameters defines Helm chart install parameters.
type ListParameters ¶
type ListParameters struct {
// Filter is an optional release name filter as a perl regex.
Filter string
}
ListParameters defines parameters for listing releases.
type Release ¶
type Release struct {
// Name is a release name.
Name string
// Status is release status.
Status string
// Chart is a deployed chart name and version.
Chart string
// Namespace is a namespace where release is deployed.
Namespace string
// Updated is when a release was last updated.
Updated time.Time
// Revision is a release version number.
//
// It begins at 1 and is incremented for each upgrade/rollback.
Revision int
// Description is a release description.
Description string
}
Release describes an application release.
type RenderParameters ¶
type RenderParameters struct {
// Path is a chart path.
Path string
// Values is a list of YAML files with values.
Values []string
// Set is a list of values set on the CLI.
Set []string
}
RenderParameters defines parameters to render Helm template.
type Repository ¶
type Repository interface {
// FetchChart returns the specified application as a Helm chart tarball.
FetchChart(loc.Locator) (io.ReadCloser, error)
// GetIndexFile returns the chart repository index file.
GetIndexFile() (io.Reader, error)
// AddToIndex adds the specified application to the repository index.
AddToIndex(locator loc.Locator, upsert bool) error
// RemoveFromIndex removes the specified application from the repository index.
RemoveFromIndex(loc.Locator) error
// RebuildIndex fully rebuilds the chart repository index.
RebuildIndex() error
}
Repository defines interface for a Helm repository backend.
type RollbackParameters ¶
type RollbackParameters struct {
// Release is a name of the release to rollback.
Release string
// Revision is a revision number to rollback to.
Revision int
}
RollbackParameters defines release rollback parameters.
type UpgradeParameters ¶
type UpgradeParameters struct {
// Release is a name of the release to upgrade.
Release string
// Path is an upgrade chart path.
Path string
// Values is a list of YAML files with values.
Values []string
// Set is a list of values set on the CLI.
Set []string
}
UpgradeParameters defines release upgrade parameters.