Documentation ¶
Index ¶
Constants ¶
const ( // Version of the current Chartfile implementation Version = 1 // Filename of the Chartfile Filename = "chartfile.yaml" // DefaultDir is the directory used for storing Charts if not specified // otherwise DefaultDir = "charts" )
const DefaultNameFormat = `{{ print .kind "_" .metadata.name | snakecase }}`
DefaultNameFormat to use when no nameFormat is supplied
Variables ¶
This section is empty.
Functions ¶
func NativeFunc ¶
func NativeFunc(h Helm) *jsonnet.NativeFunction
NativeFunc returns a jsonnet native function that provides the same functionality as `Helm.Template` of this package. Charts are required to be present on the local filesystem, at a relative location to the file that calls `helm.template()` / `std.native('helmTemplate')`. This guarantees hermeticity
Types ¶
type Chartfile ¶
type Chartfile struct { // Version of the Chartfile schema (for future use) Version uint `json:"version"` // Repositories to source from Repositories Repos `json:"repositories"` // Requires lists Charts expected to be present in the charts folder Requires Requirements `json:"requires"` // Folder to use for storing Charts. Defaults to 'charts' Directory string `json:"directory,omitempty"` }
Chartfile is the schema used to declaratively define locally required Helm Charts
type Charts ¶
type Charts struct { // Manifest are the chartfile.yaml contents. It holds data about the developers intentions Manifest Chartfile // Helm is the helm implementation underneath. ExecHelm is the default, but // any implementation of the Helm interface may be used Helm Helm // contains filtered or unexported fields }
Charts exposes the central Chartfile management functions
func InitChartfile ¶
func LoadChartfile ¶
LoadChartfile opens a Chartfile tree
func (*Charts) Add ¶
Add adds every Chart in reqs to the Manifest after validation, and runs Vendor afterwards
func (Charts) ManifestFile ¶
ManifestFile returns the full path to the chartfile.yaml
type ExecHelm ¶
type ExecHelm struct{}
ExecHelm is a Helm implementation powered by the `helm` command line utility
func (ExecHelm) RepoUpdate ¶
RepoUpdate implements Helm.RepoUpdate
type Helm ¶
type Helm interface { // Pull downloads a Helm Chart from a remote Pull(chart, version string, opts PullOpts) error // RepoUpdate fetches the latest remote index RepoUpdate(opts Opts) error // Template returns the individual resources of a Helm Chart Template(name, chart string, opts TemplateOpts) (manifest.List, error) }
Helm provides high level access to some Helm operations
type JsonnetOpts ¶
type JsonnetOpts struct { TemplateOpts // CalledFrom is the file that calls helmTemplate. This is used to find the // vendored chart relative to this file CalledFrom string `json:"calledFrom"` // NameTemplate is used to create the keys in the resulting map NameFormat string `json:"nameFormat"` }
JsonnetOpts are additional properties the consumer of the native func might pass.
type Opts ¶
type Opts struct {
Repositories []Repo
}
Opts are additional, non-required options that all Helm operations accept
type Repo ¶
type Repo struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` CAFile string `json:"caFile,omitempty"` CertFile string `json:"certFile,omitempty"` KeyFile string `json:"keyFile,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` }
Repo describes a single Helm repository
type Requirement ¶
Requirement describes a single required Helm Chart. Both, Chart and Version are required
type Requirements ¶
type Requirements []Requirement
Requirements is an aggregate of all required Charts
func (Requirements) Has ¶
func (r Requirements) Has(req Requirement) bool
Has reports whether 'req' is already part of the requirements
type TemplateOpts ¶
type TemplateOpts struct { // Values to pass to Helm using --values Values map[string]interface{} // Kubernetes api versions used for Capabilities.APIVersions APIVersions []string // IncludeCRDs specifies whether CustomResourceDefinitions are included in // the template output IncludeCRDs bool // Namespace scope for this request Namespace string // NoHooks specifies whether hooks should be excluded from the template output NoHooks bool }
TemplateOpts are additional, non-required options for Helm.Template
func (TemplateOpts) Flags ¶
func (t TemplateOpts) Flags() []string
Flags returns all options apart from Values as their respective `helm template` flag equivalent