Documentation
¶
Index ¶
- Variables
- func ProhibitDst(values []ValuesReference) error
- type Chart
- type Config
- type Configs
- type DependencyType
- type DependsOnReference
- type PendingStrategy
- type ValuesReference
- func (v *ValuesReference) Download() error
- func (v ValuesReference) JSONSchema() *jsonschema.Schema
- func (v ValuesReference) MarshalYAML() (interface{}, error)
- func (v *ValuesReference) SetUniq(dir string, name uniqname.UniqName) *ValuesReference
- func (v *ValuesReference) SetViaRelease(rel Config, dir, templater string) error
- func (v *ValuesReference) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
var ( // 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") )
var ErrMissingDependency = errors.New("dependency is missing")
ErrSkipValues is returned when values cannot be used and are skipped.
var ErrPendingRelease = errors.New("release is in pending status")
ErrPendingRelease is an error for fail strategy that release is in pending status.
var ErrSkipValues = errors.New("values have been skipped")
ErrSkipValues is returned when values cannot be used and are skipped.
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 {
action.ChartPathOptions `json:",inline"`
Name string `json:"name" jsonschema:"description=Name of the chart,example=bitnami/nginx,example=oci://ghcr.io/helmwave/unit-test-oci"`
}
Chart is structure for chart download options.
func (*Chart) UnmarshalYAML ¶ added in v0.20.0
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() (*release.Release, error)
List() (*release.Release, error)
Rollback(int) error
Status() (*release.Release, error)
Name() string
Namespace() string
Chart() Chart
SetChart(string)
DependsOn() []*DependsOnReference
Tags() []string
Repo() string
Values() []ValuesReference
HelmWait() bool
KubeContext() string
}
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) JSONSchema ¶ added in v0.23.0
func (Configs) JSONSchema() *jsonschema.Schema
func (*Configs) UnmarshalYAML ¶ added in v0.19.1
UnmarshalYAML is an unmarshaller for github.com/goccy/go-yaml 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 `json:"name" jsonschema:"description=Uniqname (or just name if in same namespace) of dependency release"`
Tag string `json:"tag,omitempty" jsonschema:"description=All available releases with the tag will be applied as dependencies"`
Optional bool `json:"optional" jsonschema:"description=Whether the dependency is required to be present in plan,default=false"`
}
DependsOnReference is used to store release dependencies.
func (*DependsOnReference) Type ¶ added in v0.24.0
func (d *DependsOnReference) Type() DependencyType
func (*DependsOnReference) Uniq ¶ added in v0.24.0
func (d *DependsOnReference) Uniq() uniqname.UniqName
func (*DependsOnReference) UnmarshalYAML ¶ added in v0.24.0
func (d *DependsOnReference) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML is used to implement InterfaceUnmarshaler interface of github.com/goccy/go-yaml.
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 `json:"src" jsonschema:"required,description=Source of values. Can be local path or HTTP URL"`
Dst string `json:"dst"`
DelimiterLeft string `json:"delimiter_left,omitempty" jsonschema:"Set left delimiter for template engine,default={{"`
DelimiterRight string `json:"delimiter_right,omitempty" jsonschema:"Set right delimiter for template engine,default=}}"`
Strict bool `json:"strict" jsonschema:"description=Whether to fail if values is not found,default=false"`
Render bool `json:"render" jsonschema:"description=Whether to use templater to render values,default=true"`
}
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() (interface{}, error)
MarshalYAML is used to implement Marshaler interface of github.com/goccy/go-yaml.
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 ErrSkipValues if values cannot be downloaded or doesn't exist in local FS.
func (*ValuesReference) UnmarshalYAML ¶ added in v0.11.0
func (v *ValuesReference) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML flexible config.