helm

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(j *Release, k *Release) string

Types

type Chart

type Chart struct {
	Name       string
	Version    string
	AppVersion string
	Values     Values
	Templates  []*File
}

Chart describes the chart for a release

type Client

type Client interface {
	Get(releaseName string, opts GetOptions) (*Release, error)
	Status(releaseName string, opts StatusOptions) (Status, error)
	UpgradeFromPath(chartPath string, releaseName string, values []byte, opts UpgradeOptions) (*Release, error)
	History(releaseName string, opts HistoryOptions) ([]*Release, error)
	Rollback(releaseName string, opts RollbackOptions) (*Release, error)
	Test(releaseName string, opts TestOptions) error
	DependencyUpdate(chartPath string) error
	RepositoryIndex() error
	RepositoryAdd(name, url, username, password, certFile, keyFile, caFile string) error
	RepositoryRemove(name string) error
	RepositoryImport(path string) error
	Pull(ref, version, dest string) (string, error)
	PullWithRepoURL(repoURL, name, version, dest string) (string, error)
	Uninstall(releaseName string, opts UninstallOptions) error
	GetChartRevision(chartPath string) (string, error)
	Version() string
}

Client is the generic interface for Helm (v2 and v3) clients.

type Clients

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

Clients is the storage for clients, indexed by version.

func (*Clients) Add

func (cs *Clients) Add(version string, client Client)

func (*Clients) Load

func (cs *Clients) Load(version string) (Client, bool)

type File

type File struct {
	Name string
	Data []byte
}

File represents a file as a name/value pair. The name is a relative path within the scope of the chart's base directory.

type GetOptions

type GetOptions struct {
	Namespace string
	Version   int
}

GetOptions holds the options available for Helm get operations, the version implementation _must_ implement all fields supported by that version but can (silently) ignore unsupported set values.

type HistoryOptions

type HistoryOptions struct {
	Namespace string
	Max       int
}

HistoryOption holds the options available for Helm history operations, the version implementation _must_ implement all fields supported by that version but can (silently) ignore unsupported set values.

type Info

type Info struct {
	LastDeployed time.Time
	Description  string
	Status       Status
}

Info holds metadata of a chart deployment

type Release

type Release struct {
	Name      string
	Namespace string
	Chart     *Chart
	Info      *Info
	Values    map[string]interface{}
	Manifest  string
	Version   int
}

Release describes a generic chart deployment

type RollbackOptions

type RollbackOptions struct {
	Namespace    string
	Version      int
	Timeout      time.Duration
	Wait         bool
	DisableHooks bool
	DryRun       bool
	Recreate     bool
	Force        bool
}

RollbackOptions holds the options available for Helm rollback operations, the version implementation _must_ implement all fields supported by that version but can (silently) ignore unsupported set values.

type Status

type Status string

Status holds the status of a release

const (
	// StatusUnknown indicates that a release is in an uncertain state
	StatusUnknown Status = "unknown"
	// StatusDeployed indicates that the release has been pushed to Kubernetes
	StatusDeployed Status = "deployed"
	// StatusUninstalled indicates that a release has been uninstalled from Kubernetes
	StatusUninstalled Status = "uninstalled"
	// StatusSuperseded indicates that this release object is outdated and a newer one exists
	StatusSuperseded Status = "superseded"
	// StatusFailed indicates that the release was not successfully deployed
	StatusFailed Status = "failed"
	// StatusUninstalling indicates that a uninstall operation is underway
	StatusUninstalling Status = "uninstalling"
	// StatusPendingInstall indicates that an install operation is underway
	StatusPendingInstall Status = "pending-install"
	// StatusPendingUpgrade indicates that an upgrade operation is underway
	StatusPendingUpgrade Status = "pending-upgrade"
	// StatusPendingRollback indicates that an rollback operation is underway
	StatusPendingRollback Status = "pending-rollback"
)

Define release statuses

func (Status) AllowsUpgrade

func (s Status) AllowsUpgrade() bool

AllowsUpgrade returns true if the status allows the release to be upgraded. This is currently only the case if it equals `StatusDeployed`.

func (Status) String

func (s Status) String() string

String returns the Status as a string

type StatusOptions

type StatusOptions struct {
	Namespace string
	Version   int
}

StatusOptions holds the options available for Helm status operations, the version implementation _must_ implement all fields supported by that version but can (silently) ignore unsupported set values.

type TestOptions

type TestOptions struct {
	Namespace string
	Cleanup   bool
	Timeout   time.Duration
}

TestOptions holds the options available for Helm test operations, the version implementation _must_ implement all fields supported by that version but can (silently) ignore unsupported set values.

type UninstallOptions

type UninstallOptions struct {
	Namespace    string
	DisableHooks bool
	DryRun       bool
	KeepHistory  bool
	Timeout      time.Duration
}

UninstallOptions holds the options available for Helm uninstall operations, the version implementation _must_ implement all fields supported by that version but can (silently) ignore unsupported set values.

type UpgradeOptions

type UpgradeOptions struct {
	Namespace         string
	Timeout           time.Duration
	Wait              bool
	Install           bool
	DisableHooks      bool
	DryRun            bool
	ClientOnly        bool
	Force             bool
	ResetValues       bool
	SkipCRDs          bool
	ReuseValues       bool
	Recreate          bool
	MaxHistory        int
	Atomic            bool
	DisableValidation bool
}

UpgradeOptions holds the options available for Helm upgrade operations, the version implementation _must_ implement all fields supported by that version but can (silently) ignore unsupported set values.

type Values

type Values map[string]interface{}

Values represents a collection of (Helm) values. We define our own type to avoid working with two `chartutil` versions.

func (Values) Checksum

func (v Values) Checksum() string

Checksum calculates and returns the SHA256 checksum of the YAML encoded values.

func (Values) YAML

func (v Values) YAML() ([]byte, error)

YAML encodes the values into YAML bytes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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