Documentation ¶
Index ¶
- Constants
- type CRD
- type Chart
- func (ch *Chart) AddDependency(charts ...*Chart)
- func (ch *Chart) AppVersion() string
- func (ch *Chart) CRDObjects() []CRD
- func (ch *Chart) CRDs() []*File
- func (ch *Chart) ChartFullPath() string
- func (ch *Chart) ChartPath() string
- func (ch *Chart) Dependencies() []*Chart
- func (ch *Chart) IsRoot() bool
- func (ch *Chart) Name() string
- func (ch *Chart) Parent() *Chart
- func (ch *Chart) Root() *Chart
- func (ch *Chart) SetDependencies(charts ...*Chart)
- func (ch *Chart) Validate() error
- type Dependency
- type File
- type Lock
- type Maintainer
- type Metadata
- type ValidationError
Constants ¶
const APIVersionV1 = "v1"
APIVersionV1 is the API version number for version 1.
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 { // Raw contains the raw contents of the files originally contained in the chart archive. // // This should not be used except in special cases like `helm show values`, // where we want to display the raw values, comments and all. Raw []*File `json:"-"` // Metadata is the contents of the Chartfile. Metadata *Metadata `json:"metadata"` // Lock is the contents of Chart.lock. Lock *Lock `json:"lock"` // Templates for this chart. Templates []*File `json:"templates"` // Values are default config for this chart. Values map[string]interface{} `json:"values"` // Schema is an optional JSON schema for imposing structure on Values Schema []byte `json:"schema"` // Files are miscellaneous files in a chart archive, // e.g. README, LICENSE, etc. Files []*File `json:"files"` // 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 ¶
AddDependency determines if the chart is a subchart.
func (*Chart) AppVersion ¶
AppVersion returns the appversion of the chart.
func (*Chart) CRDObjects ¶
CRDObjects returns a list of CRD objects in the 'crds/' directory of a Helm chart & subcharts
func (*Chart) CRDs ¶
CRDs returns a list of File objects in the 'crds/' directory of a Helm chart. Deprecated: use CRDObjects()
func (*Chart) ChartFullPath ¶
ChartFullPath returns the full path to this chart.
func (*Chart) Dependencies ¶
Dependencies are the charts that this chart depends on.
func (*Chart) SetDependencies ¶
SetDependencies replaces the chart dependencies.
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"` // Repository username Username string `json:"username,omitempty"` // Repository password Password string `json:"password,omitempty"` // 子应用实例编码 ReleaseName string `json:"releaseName,omitempty"` // 子应用实例操作历史ID Commit string `json:"commit,omitempty"` // 子应用实例执行优先级 Priority int `json:"priority,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 `json:"name"` // Data is the template as byte data. Data []byte `json:"data"` }
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 { // Generated 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.
type ValidationError ¶
type ValidationError string
ValidationError represents a data validation error.
func (ValidationError) Error ¶
func (v ValidationError) Error() string