charts

package
v0.5.1-0...-faa3f61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func InsertVersion(data []byte) []byte

InsertVersion returns the chart values file contents passed in with the version placeholder replaced with the current version

func InsertVersionValues

func InsertVersionValues(values chartutil.Values) (chartutil.Values, error)

InsertVersionValues returns the chart values with the version placeholder replaced with the current version.

func MergeMaps

func MergeMaps(a, b map[string]interface{}) map[string]interface{}

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

func (*Chart) Render

func (c *Chart) Render() (bytes.Buffer, error)

Render returns a bytes buffer with the result of rendering a Helm chart

func (*Chart) RenderCNI

func (c *Chart) RenderCNI() (bytes.Buffer, error)

RenderCNI returns a bytes buffer with the result of rendering a Helm chart

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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