release

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNameEmpty = errors.New("release name is empty")

	// ErrMissingDependency is returned when values can't be used and are skipped.
	ErrMissingDependency = errors.New("dependency is missing")

	// ErrPendingRelease is an error for fail strategy that release is in pending status.
	ErrPendingRelease = errors.New("release is in pending status")

	// ErrValuesNotExist is returned when values can't be used and are skipped.
	ErrValuesNotExist = errors.New("values file doesn't exist")

	// ErrNotFound is an error for not found release.
	ErrNotFound = driver.ErrReleaseNotFound

	// ErrFoundMultiple is an error for multiple releases found by name.
	ErrFoundMultiple = errors.New("found multiple releases o_0")

	// ErrDepFailed is an error thrown when dependency release fails.
	ErrDepFailed = errors.New("dependency failed")

	ErrUnknownFormat = errors.New("unknown format")
)

Functions

func ProhibitDst added in v0.20.2

func ProhibitDst(values []ValuesReference) error

ProhibitDst Dst now is public method. Dst needs to marshal for export. Also, dst needs to unmarshal for import from plan.

Types

type Chart added in v0.12.0

type Chart struct {
	Name                  string `` /* 142-byte string literal not displayed */
	CaFile                string `yaml:"ca_file" json:"ca_file" jsonschema:"description=Verify certificates of HTTPS-enabled servers using this CA bundle"`
	CertFile              string `yaml:"cert_file" json:"cert_file" jsonschema:"description=Identify HTTPS client using this SSL certificate file"`
	KeyFile               string `yaml:"key_file" json:"key_file" jsonschema:"description=Identify HTTPS client using this SSL key file"`
	Keyring               string `yaml:"keyring" json:"keyring" jsonschema:"description=Location of public keys used for verification"`
	RepoURL               string `yaml:"repo_url" json:"repo_url" jsonschema:"description=Chart repository url"`
	Username              string `yaml:"username" json:"username" jsonschema:"description=Chart repository username"`
	Password              string `yaml:"password" json:"password" jsonschema:"description=Chart repository password"`
	Version               string `yaml:"version" json:"version" jsonschema:"description=Chart version"`
	InsecureSkipTLSverify bool   `` /* 132-byte string literal not displayed */
	Verify                bool   `yaml:"verify" json:"verify" jsonschema:"description=Verify the provenance of the chart before using it"`
	PassCredentialsAll    bool   `yaml:"pass_credentials" json:"pass_credentials" jsonschema:"description=Pass credentials to all domains"`
	SkipDependencyUpdate  bool   `` /* 141-byte string literal not displayed */
	SkipRefresh           bool   `` /* 127-byte string literal not displayed */
}

Chart is a structure for chart download options.

func (*Chart) CopyOptions added in v0.28.1

func (c *Chart) CopyOptions(cpo *action.ChartPathOptions)

CopyOptions is a helper for copy options from Chart to ChartPathOptions.

func (*Chart) IsRemote added in v0.24.0

func (u *Chart) IsRemote() bool

func (*Chart) UnmarshalYAML added in v0.20.0

func (u *Chart) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML flexible config.

type Config

type Config interface {
	helper.EqualChecker[Config]
	log.LoggerGetter
	Uniq() uniqname.UniqName
	Sync(context.Context) (*release.Release, error)
	SyncDryRun(context.Context) (*release.Release, error)
	AllowFailure() bool
	DryRun(bool)
	ChartDepsUpd() error
	DownloadChart(string) error
	BuildValues(string, string) error
	Uninstall(context.Context) (*release.UninstallReleaseResponse, error)
	Get(int) (*release.Release, error)
	List() (*release.Release, error)
	Rollback(context.Context, int) error
	Status() (*release.Release, error)
	Name() string
	Namespace() string
	Chart() *Chart
	SetChartName(string)
	DependsOn() []*DependsOnReference
	SetDependsOn([]*DependsOnReference)
	Tags() []string
	Repo() string
	Values() []ValuesReference
	HelmWait() bool
	KubeContext() string
	Cfg() *action.Configuration
	HooksDisabled() bool
	OfflineKubeVersion() *chartutil.KubeVersion
	Validate() error
}

Config is an interface to manage particular helm release.

type Configs added in v0.19.1

type Configs []Config

Configs type of array Config.

func (Configs) Contains added in v0.30.2

func (r Configs) Contains(rel Config) (Config, bool)

func (Configs) ContainsUniq added in v0.30.2

func (r Configs) ContainsUniq(uniq uniqname.UniqName) (Config, bool)

func (Configs) JSONSchema added in v0.23.0

func (Configs) JSONSchema() *jsonschema.Schema

func (*Configs) UnmarshalYAML added in v0.19.1

func (r *Configs) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML is an unmarshaller for gopkg.in/yaml.v3 to parse YAML into `Config` interface.

type DependencyType added in v0.24.0

type DependencyType int
const (
	DependencyRelease DependencyType = iota
	DependencyTag
	DependencyInvalid
)

type DependsOnReference added in v0.24.0

type DependsOnReference struct {
	Name string `yaml:"name" json:"name" jsonschema:"description=Uniqname (or just name if in same namespace) of dependency release"` //nolint:lll
	Tag  string ``                                                                                                                    //nolint:lll
	/* 134-byte string literal not displayed */
	Optional bool `` //nolint:lll
	/* 127-byte string literal not displayed */
}

DependsOnReference is used to store release dependencies.

nolintlint:lll

func (*DependsOnReference) Type added in v0.24.0

func (*DependsOnReference) Uniq added in v0.24.0

func (*DependsOnReference) UnmarshalYAML added in v0.24.0

func (d *DependsOnReference) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML is used to implement InterfaceUnmarshaler interface of gopkg.in/yaml.v3.

type DuplicateError added in v0.30.2

type DuplicateError struct {
	Uniq uniqname.UniqName
}

func (DuplicateError) Error added in v0.30.2

func (err DuplicateError) Error() string

func (DuplicateError) Is added in v0.30.2

func (DuplicateError) Is(target error) bool

type InvalidNamespaceError added in v0.30.2

type InvalidNamespaceError struct {
	Namespace string
}

func (InvalidNamespaceError) Error added in v0.30.2

func (err InvalidNamespaceError) Error() string

func (InvalidNamespaceError) Is added in v0.30.2

func (InvalidNamespaceError) Is(target error) bool

type PendingStrategy added in v0.21.0

type PendingStrategy string

PendingStrategy is a type for enumerating strategies for handling pending releases.

const (
	// PendingStrategyRollback rolls back pending release.
	PendingStrategyRollback PendingStrategy = "rollback"
	// PendingStrategyUninstall uninstalls pending release.
	PendingStrategyUninstall PendingStrategy = "uninstall"
)

func (PendingStrategy) JSONSchema added in v0.24.0

func (PendingStrategy) JSONSchema() *jsonschema.Schema

type ValuesReference added in v0.11.0

type ValuesReference struct {
	Src           string `yaml:"src" json:"src" jsonschema:"required,description=Source of values. Can be local path or HTTP URL"`
	Dst           string `yaml:"dst" json:"dst" `
	DelimiterLeft string `` //nolint:lll
	/* 127-byte string literal not displayed */
	DelimiterRight string `` //nolint:lll
	/* 129-byte string literal not displayed */
	Strict bool `yaml:"strict" json:"strict" jsonschema:"description=Whether to fail if values is not found,default=false"`    //nolint:lll
	Render bool `yaml:"render" json:"render"  jsonschema:"description=Whether to use templater to render values,default=true"` //nolint:lll
}

ValuesReference is used to match source values file path and temporary.

func (*ValuesReference) Download added in v0.11.0

func (v *ValuesReference) Download() error

Download downloads values by source URL and places to destination path.

func (ValuesReference) JSONSchema added in v0.24.0

func (v ValuesReference) JSONSchema() *jsonschema.Schema

func (ValuesReference) MarshalYAML added in v0.12.0

func (v ValuesReference) MarshalYAML() (any, error)

MarshalYAML is used to implement Marshaler interface of gopkg.in/yaml.v3.

func (*ValuesReference) SetUniq added in v0.12.5

func (v *ValuesReference) SetUniq(dir string, name uniqname.UniqName) *ValuesReference

SetUniq generates unique file path based on provided base directory, release uniqname and sha1 of source path.

func (*ValuesReference) SetViaRelease added in v0.12.0

func (v *ValuesReference) SetViaRelease(rel Config, dir, templater string) error

SetViaRelease downloads and templates values file. Returns ErrValuesNotExist if values can't be downloaded or doesn't exist in local FS.

func (*ValuesReference) UnmarshalYAML added in v0.11.0

func (v *ValuesReference) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML flexible config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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