loader

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0, Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ctx context.Context, name string) (*chart.Chart, error)

Load takes a string name, tries to resolve it to a file or directory, and then loads it.

This is the preferred way to load a chart. It will discover the chart encoding and hand off to the appropriate chart reader.

If a .helmignore file is present, the directory loader will skip loading any files matching it. But .helmignore is not evaluated when reading out of an archive.

func LoadArchive

func LoadArchive(ctx context.Context, in io.Reader) (*chart.Chart, error)

LoadArchive loads from a reader containing a compressed tar archive.

func LoadDir

func LoadDir(ctx context.Context, dir string) (*chart.Chart, error)

LoadDir loads from a directory.

This loads charts only from directories.

func LoadFile

func LoadFile(ctx context.Context, name string) (*chart.Chart, error)

LoadFile loads from an archive file.

func LoadFiles

func LoadFiles(ctx context.Context, files []*archive.BufferedFile) (*chart.Chart, error)

LoadFiles loads from in-memory files.

func LoadValues

func LoadValues(data io.Reader) (map[string]any, error)

LoadValues loads values from a reader.

The reader is expected to contain one or more YAML documents, the values of which are merged. And the values can be either a chart's default values or user-supplied values.

func MergeMaps

func MergeMaps(a, b map[string]any) map[string]any

MergeMaps merges two maps. If a key exists in both maps, the value from b will be used. If the value is a map, the maps will be merged recursively.

Types

type ChartLoader

type ChartLoader interface {
	Load(ctx context.Context) (*chart.Chart, error)
}

ChartLoader loads a chart.

func Loader

func Loader(name string) (ChartLoader, error)

Loader returns a new ChartLoader appropriate for the given chart name

type DirLoader

type DirLoader string

DirLoader loads a chart from a directory

func (DirLoader) Load

func (l DirLoader) Load(ctx context.Context) (*chart.Chart, error)

Load loads the chart

type FileLoader

type FileLoader string

FileLoader loads a chart from a file

func (FileLoader) Load

func (l FileLoader) Load(ctx context.Context) (*chart.Chart, error)

Load loads a chart

Jump to

Keyboard shortcuts

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