helm

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CHANGELOGTEMPLATE contains helm chart changelog information
	CHANGELOGTEMPLATE string = `` /* 618-byte string literal not displayed */

	// MINORVERSION defines minor version identifier
	MINORVERSION string = "minor"
	// MAJORVERSION defines major version identifier
	MAJORVERSION string = "major"
	// PATCHVERSION defines patch version identifier
	PATCHVERSION string = "patch"
	// NOINCREMENT defines if a chart version doesn't need to be incremented
	NOINCREMENT string = "none"
)

Variables

View Source
var (
	// ErrWrongConfig is returned in case of a wrong configuration
	ErrWrongConfig = errors.New("wrong helm configuration")
)

Functions

This section is empty.

Types

type Chart

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

Chart defines a resource of kind "helmchart"

func New

func New(spec interface{}) (*Chart, error)

New returns a reference to a newly initialized Chart object from a Spec or an error if the provided YamlSpec triggers a validation error.

func (Chart) Changelog

func (c Chart) Changelog() string

Changelog returns a rendered template with this chart version informations

func (*Chart) Condition

func (c *Chart) Condition(source string) (bool, error)

Condition check if a specific chart version exist

func (*Chart) ConditionFromSCM

func (c *Chart) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)

ConditionFromSCM returns an error because it's not supported

func (*Chart) DependencyUpdate added in v0.25.0

func (c *Chart) DependencyUpdate(out *bytes.Buffer, chartPath string) error

DependencyUpdate ensures that Chart.lock is updated if needed

func (*Chart) GetRepoIndexFile added in v0.25.0

func (c *Chart) GetRepoIndexFile() (repo.IndexFile, error)

GetRepoIndexFile loads an index file and does minimal validity checking. This will fail if API Version is not set (ErrNoAPIVersion) or if the unmarshal fails.

func (*Chart) MetadataUpdate added in v0.25.0

func (c *Chart) MetadataUpdate(chartPath string, dryRun bool) error

MetadataUpdate updates a metadata if necessary and it bump the ChartVersion

func (*Chart) RequirementsUpdate added in v0.25.0

func (c *Chart) RequirementsUpdate(chartPath string) error

RequirementsUpdate test if we are updating the file requirements.yaml if it's the case then we also have to delete and recreate the file requirements.lock

func (*Chart) Source

func (c *Chart) Source(workingDir string) (string, error)

Source return the latest version

func (*Chart) Target

func (c *Chart) Target(source string, dryRun bool) (changed bool, err error)

Target updates helm chart, it receives the default source value and a dryrun flag then return if it changed something or failed

func (*Chart) TargetFromSCM

func (c *Chart) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (
	changed bool, files []string, message string, err error)

TargetFromSCM updates helm chart then push changed to a scm, it receives the default source value and dryrun flag then return if it changed something or failed

func (*Chart) ValidateTarget

func (c *Chart) ValidateTarget() error

ValidateTarget ensure that target required parameter are set

type Spec

type Spec struct {
	// [target] Defines the Helm Chart file to update.
	File string `yaml:",omitempty"`
	// [target] Defines the key within the file that need to be updated.
	Key string `yaml:",omitempty"`
	// [target] Defines the Chart name path like "stable/chart".
	Name string `yaml:",omitempty"`
	// [source,condition] Defines the chart location URL.
	URL string `yaml:",omitempty"`
	// [target] Defines the value to set for a key
	Value string `yaml:",omitempty"`
	// [source,condition] Defines the Chart version, default value set based on sourceinput value
	Version string `yaml:",omitempty"`
	// [target] Defines if a Chart changes, triggers (or not) a Chart version update, accepted values is a comma separated list of "none,major,minor,patch"
	VersionIncrement string `yaml:",omitempty"`
	// [target] Defines if AppVersion must be updated as well
	AppVersion bool `yaml:",omitempty"`
}

Spec defines a specification for an "helmchart" resource parsed from an updatecli manifest file

Jump to

Keyboard shortcuts

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