Documentation
¶
Index ¶
- Constants
- func GenerateIndexFile(apps []app.Application) (*repo.IndexFile, error)
- func Install(params InstallParameters) (storage.Release, error)
- func List(params ListParameters) ([]storage.Release, error)
- func Render(params RenderParameters) (map[string]string, error)
- func Revisions(params RevisionsParameters) ([]storage.Release, error)
- func Rollback(params RollbackParameters) error
- func Uninstall(params UninstallParameters) (storage.Release, error)
- func Upgrade(params UpgradeParameters) (storage.Release, error)
- type Config
- type InstallParameters
- type ListParameters
- type RenderParameters
- type Repository
- type RevisionsParameters
- type RollbackParameters
- type UninstallParameters
- type UpgradeParameters
Constants ¶
const (
// BackendLocal represents cluster-local chart repository backend.
BackendLocal = "local"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateIndexFile ¶
func GenerateIndexFile(apps []app.Application) (*repo.IndexFile, error)
GenerateIndexFile generates a Helm repository index file for the provided apps.
func Install ¶
func Install(params InstallParameters) (storage.Release, error)
Install installs a Helm chart and returns release information. Code ported from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/install.go
func List ¶
func List(params ListParameters) ([]storage.Release, error)
List returns a list of releases matching provided parameters.
func Render ¶
func Render(params RenderParameters) (map[string]string, error)
Render renders templates of a provided Helm chart. Code ported from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/template.go
func Revisions ¶
func Revisions(params RevisionsParameters) ([]storage.Release, error)
Revisions returns the revision history for the specified release. Code ported from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/history.go
func Rollback ¶
func Rollback(params RollbackParameters) error
Rollback rolls back a release to the specified version. Code ported from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/rollback.go
func Uninstall ¶
func Uninstall(params UninstallParameters) (storage.Release, error)
Uninstall uninstalls the specified release. Code ported from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/uninstall.go
func Upgrade ¶
func Upgrade(params UpgradeParameters) (storage.Release, error)
Upgrade upgrades a release. Code ported from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/upgrade.go
Types ¶
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
// Release is an optional release name.
Release string
// Namespace is a namespace to install release into.
Namespace string
}
InstallParameters defines Helm chart install parameters.
type ListParameters ¶
type ListParameters struct {
// Namespace is a namespace of release to list.
Namespace string
// Filter is an optional release name filter as a perl regex.
Filter string
// All returns releases with all possible statuses.
All bool
}
ListParameters defines parameters for listing releases. Code ported from: https://github.com/helm/helm/blob/v3.4.2/cmd/helm/list.go
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.
func NewRepository ¶
func NewRepository(config Config) (Repository, error)
NewRepository returns a new cluster chart repository.
type RevisionsParameters ¶
type RevisionsParameters struct {
// Namespace is the namespace the release was installed in.
Namespace string
// Release is the name of the release to get revisions for.
Release string
}
RevisionsParameters defines release revision parameters.
type RollbackParameters ¶
type RollbackParameters struct {
// Namespace is the namespace the release was installed in.
Namespace string
// 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 UninstallParameters ¶
type UninstallParameters struct {
// Namespace is the namespace the release was installed in.
Namespace string
// Release is the name of the release to get revisions for.
Release string
}
UninstallParameters defines release uninstall parameters.
type UpgradeParameters ¶
type UpgradeParameters struct {
// Namespace is the namespace the release was installed in.
Namespace string
// 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.