chart

package
v3.0.0-beta.1+incompat... Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersionV1 = "v1"

APIVersionV1 is the API version number for version 1.

View Source
const APIVersionV2 = "v2"

APIVersionV2 is the API version number for version 2.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart struct {
	// Metadata is the contents of the Chartfile.
	Metadata *Metadata
	// LocK is the contents of Chart.lock.
	Lock *Lock
	// Templates for this chart.
	Templates []*File
	// Values are default config for this template.
	Values map[string]interface{}
	// Schema is an optional JSON schema for imposing structure on Values
	Schema []byte
	// Files are miscellaneous files in a chart archive,
	// e.g. README, LICENSE, etc.
	Files []*File
	// contains filtered or unexported fields
}

Chart is a helm package that contains metadata, a default config, zero or more optionally parameterizable templates, and zero or more charts (dependencies).

func (*Chart) AddDependency

func (ch *Chart) AddDependency(charts ...*Chart)

AddDependency determines if the chart is a subchart.

func (*Chart) AppVersion

func (ch *Chart) AppVersion() string

AppVersion returns the appversion of the chart.

func (*Chart) CRDs

func (ch *Chart) CRDs() []*File

CRDs returns a list of File objects in the 'crds/' directory of a Helm chart.

func (*Chart) ChartFullPath

func (ch *Chart) ChartFullPath() string

ChartFullPath returns the full path to this chart.

func (*Chart) ChartPath

func (ch *Chart) ChartPath() string

ChartPath returns the full path to this chart in dot notation.

func (*Chart) Dependencies

func (ch *Chart) Dependencies() []*Chart

Dependencies are the charts that this chart depends on.

func (*Chart) IsRoot

func (ch *Chart) IsRoot() bool

IsRoot determines if the chart is the root chart.

func (*Chart) Name

func (ch *Chart) Name() string

Name returns the name of the chart.

func (*Chart) Parent

func (ch *Chart) Parent() *Chart

Parent returns a subchart's parent chart.

func (*Chart) Root

func (ch *Chart) Root() *Chart

Root finds the root chart.

func (*Chart) SetDependencies

func (ch *Chart) SetDependencies(charts ...*Chart)

SetDependencies replaces the chart dependencies.

func (*Chart) Validate

func (ch *Chart) Validate() error

Validate validates the metadata.

type Dependency

type Dependency struct {
	// Name is the name of the dependency.
	//
	// This must mach the name in the dependency's Chart.yaml.
	Name string `json:"name"`
	// Version is the version (range) of this chart.
	//
	// A lock file will always produce a single version, while a dependency
	// may contain a semantic version range.
	Version string `json:"version,omitempty"`
	// The URL to the repository.
	//
	// Appending `index.yaml` to this string should result in a URL that can be
	// used to fetch the repository index.
	Repository string `json:"repository"`
	// A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled )
	Condition string `json:"condition,omitempty"`
	// Tags can be used to group charts for enabling/disabling together
	Tags []string `json:"tags,omitempty"`
	// Enabled bool determines if chart should be loaded
	Enabled bool `json:"enabled,omitempty"`
	// ImportValues holds the mapping of source values to parent key to be imported. Each item can be a
	// string or pair of child/parent sublist items.
	ImportValues []interface{} `json:"import-values,omitempty"`
	// Alias usable alias to be used for the chart
	Alias string `json:"alias,omitempty"`
}

Dependency describes a chart upon which another chart depends.

Dependencies can be used to express developer intent, or to capture the state of a chart.

type File

type File struct {
	// Name is the path-like name of the template.
	Name string
	// Data is the template as byte data.
	Data []byte
}

File represents a file as a name/value pair.

By convention, name is a relative path within the scope of the chart's base directory.

type Lock

type Lock struct {
	// Genderated is the date the lock file was last generated.
	Generated time.Time `json:"generated"`
	// Digest is a hash of the dependencies in Chart.yaml.
	Digest string `json:"digest"`
	// Dependencies is the list of dependencies that this lock file has locked.
	Dependencies []*Dependency `json:"dependencies"`
}

Lock is a lock file for dependencies.

It represents the state that the dependencies should be in.

type Maintainer

type Maintainer struct {
	// Name is a user name or organization name
	Name string `json:"name,omitempty"`
	// Email is an optional email address to contact the named maintainer
	Email string `json:"email,omitempty"`
	// URL is an optional URL to an address for the named maintainer
	URL string `json:"url,omitempty"`
}

Maintainer describes a Chart maintainer.

type Metadata

type Metadata struct {
	// The name of the chart
	Name string `json:"name,omitempty"`
	// The URL to a relevant project page, git repo, or contact person
	Home string `json:"home,omitempty"`
	// Source is the URL to the source code of this chart
	Sources []string `json:"sources,omitempty"`
	// A SemVer 2 conformant version string of the chart
	Version string `json:"version,omitempty"`
	// A one-sentence description of the chart
	Description string `json:"description,omitempty"`
	// A list of string keywords
	Keywords []string `json:"keywords,omitempty"`
	// A list of name and URL/email address combinations for the maintainer(s)
	Maintainers []*Maintainer `json:"maintainers,omitempty"`
	// The URL to an icon file.
	Icon string `json:"icon,omitempty"`
	// The API Version of this chart.
	APIVersion string `json:"apiVersion,omitempty"`
	// The condition to check to enable chart
	Condition string `json:"condition,omitempty"`
	// The tags to check to enable chart
	Tags string `json:"tags,omitempty"`
	// The version of the application enclosed inside of this chart.
	AppVersion string `json:"appVersion,omitempty"`
	// Whether or not this chart is deprecated
	Deprecated bool `json:"deprecated,omitempty"`
	// Annotations are additional mappings uninterpreted by Helm,
	// made available for inspection by other applications.
	Annotations map[string]string `json:"annotations,omitempty"`
	// KubeVersion is a SemVer constraint specifying the version of Kubernetes required.
	KubeVersion string `json:"kubeVersion,omitempty"`
	// Dependencies are a list of dependencies for a chart.
	Dependencies []*Dependency `json:"dependencies,omitempty"`
	// Specifies the chart type: application or library
	Type string `json:"type,omitempty"`
}

Metadata for a Chart file. This models the structure of a Chart.yaml file.

func (*Metadata) Validate

func (md *Metadata) Validate() error

Validate checks the metadata for known issues, returning an error if metadata is not correct

type ValidationError

type ValidationError string

ValidationError represents a data validation error.

func (ValidationError) Error

func (v ValidationError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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