chart

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const OriginFile = "HelmOriginFile"

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart struct {
	Chartfile              *Chartfile
	Pods                   []*v1.Pod
	ReplicationControllers []*v1.ReplicationController
	Services               []*v1.Service
	Namespaces             []*v1.Namespace
	Secrets                []*v1.Secret
	PersistentVolumes      []*v1.PersistentVolume

	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

func Load(chart string) (*Chart, error)

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.

type Chartfile

type Chartfile struct {
	Name         string            `yaml:"name"`
	Home         string            `yaml:"home"`
	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"`
}

Chart describes a Helm Chart (e.g. Chart.yaml)

func LoadChartfile

func LoadChartfile(filename string) (*Chartfile, error)

Load loads a Chart.yaml file into a *Chart.

func (*Chartfile) Save

func (c *Chartfile) Save(filename string) error

Save saves a Chart.yaml file

type Dependency

type Dependency struct {
	Name    string `yaml:"name"`
	Version string `yaml:"version"`
}

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.

Jump to

Keyboard shortcuts

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