Documentation
¶
Index ¶
- Variables
- func FilesReader(fs http.FileSystem, dir string, files []*loader.BufferedFile) error
- func InsertVersion(data []byte) []byte
- func InsertVersionValues(values chartutil.Values) (chartutil.Values, error)
- func MergeMaps(a, b map[string]interface{}) map[string]interface{}
- func OverrideFromFile(values map[string]interface{}, fs http.FileSystem, chartName, name string) (map[string]interface{}, error)
- func ReadFile(fs http.FileSystem, dir string, f *loader.BufferedFile) error
- type Chart
Constants ¶
This section is empty.
Variables ¶
var ( // L5dPartials is the list of templates in partials chart // Keep this slice synced with the contents of /charts/partials L5dPartials = []string{ "charts/partials/" + chartutil.ChartfileName, "charts/partials/templates/_affinity.tpl", "charts/partials/templates/_capabilities.tpl", "charts/partials/templates/_debug.tpl", "charts/partials/templates/_helpers.tpl", "charts/partials/templates/_metadata.tpl", "charts/partials/templates/_nodeselector.tpl", "charts/partials/templates/_network-validator.tpl", "charts/partials/templates/_proxy-config-ann.tpl", "charts/partials/templates/_proxy-init.tpl", "charts/partials/templates/_proxy.tpl", "charts/partials/templates/_pull-secrets.tpl", "charts/partials/templates/_resources.tpl", "charts/partials/templates/_tolerations.tpl", "charts/partials/templates/_trace.tpl", "charts/partials/templates/_validate.tpl", "charts/partials/templates/_volumes.tpl", } )
Functions ¶
func FilesReader ¶
func FilesReader(fs http.FileSystem, dir string, files []*loader.BufferedFile) error
FilesReader reads all the files from a directory
func InsertVersion ¶
InsertVersion returns the chart values file contents passed in with the version placeholder replaced with the current version
func InsertVersionValues ¶
InsertVersionValues returns the chart values with the version placeholder replaced with the current version.
func MergeMaps ¶
MergeMaps returns the resultant map after merging given two maps of type map[string]interface{} The inputs are not mutated and the second map i.e b's values take precedence during merge. This gives semantically correct merge compared with `mergo.Merge` (with boolean values). See https://github.com/imdario/mergo/issues/129
func OverrideFromFile ¶
func OverrideFromFile(values map[string]interface{}, fs http.FileSystem, chartName, name string) (map[string]interface{}, error)
OverrideFromFile overrides the given map with the given file from FS
func ReadFile ¶
func ReadFile(fs http.FileSystem, dir string, f *loader.BufferedFile) error
ReadFile updates the buffered file with the data read from disk
Types ¶
type Chart ¶
type Chart struct { Name string Dir string Namespace string // RawValues are yaml-formatted values entries. Either this or Values // should be set, but not both RawValues []byte // Values are the config key-value entries. Either this or RawValues should // be set, but not both Values map[string]any Files []*loader.BufferedFile Fs http.FileSystem }
Chart holds the necessary info to render a Helm chart