Documentation
¶
Index ¶
Constants ¶
const ( // AnnFile is the annotation key for a file's origin. AnnFile = "chart.helm.sh/file" // AnnChartVersion is the annotation key for a chart's version. AnnChartVersion = "chart.helm.sh/version" // AnnChartDesc is the annotation key for a chart's description. AnnChartDesc = "chart.helm.sh/description" // AnnChartName is the annotation key for a chart name. AnnChartName = "chart.helm.sh/name" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chart ¶
type Chart struct { Chartfile *Chartfile // Kind is a map of Kind to an array of manifests. // // For example, Kind["Pod"] has an array of Pod manifests. Kind map[string][]*manifest.Manifest // Manifests is an array of Manifest objects. Manifests []*manifest.Manifest }
Chart represents a complete chart.
A chart consists of the following parts:
- Chart.yaml: In code, we refer to this as the Chartfile
- manifests/*.yaml: The Kubernetes manifests
On the Chart object, the manifests are sorted by type into a handful of recognized Kubernetes API v1 objects.
TODO: Investigate treating these as unversioned.
func Load ¶
Load loads an entire chart.
This includes the Chart.yaml (*Chartfile) and all of the manifests.
If you are just reading the Chart.yaml file, it is substantially more performant to use LoadChartfile.
func (*Chart) UnknownKinds ¶
UnknownKinds returns a list of kinds that this chart contains, but which were not in the passed in array.
A Chart will store all kinds that are given to it. This makes it possible to get a list of kinds that are not known beforehand.
type Chartfile ¶
type Chartfile struct { Name string `yaml:"name"` From *Dependency `yaml:"from,omitempty"` Home string `yaml:"home"` Source []string `yaml:"source,omitempty"` Version string `yaml:"version"` Description string `yaml:"description"` Maintainers []string `yaml:"maintainers,omitempty"` Details string `yaml:"details,omitempty"` Dependencies []*Dependency `yaml:"dependencies,omitempty"` PreInstall map[string]string `yaml:"preinstall,omitempty"` }
Chartfile describes a Helm Chart (e.g. Chart.yaml)
func LoadChartfile ¶
LoadChartfile loads a Chart.yaml file into a *Chart.
type Dependency ¶
type Dependency struct { Name string `yaml:"name"` Version string `yaml:"version"` Repo string `yaml:"repo,omitempty"` }
Dependency describes a specific dependency.
func (*Dependency) VersionOK ¶
func (d *Dependency) VersionOK(version string) bool
VersionOK returns true if the given version meets the constraints.
It returns false if the version string or constraint is unparsable or if the version does not meet the constraint.