Documentation
¶
Index ¶
- func Load(root, name string) (*chart.Chart, error)
- func LoadArchive(in io.Reader) (*chart.Chart, error)
- func LoadArchiveFiles(in io.Reader) ([]*archive.BufferedFile, error)
- func LoadFile(name string) (*chart.Chart, error)
- func SecureLoadDir(root, path string, maxSize int64) (*chart.Chart, error)
- type FileLoader
- type FileLoaderV2
- type SecureDirLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load takes a string root and name, tries to resolve it to a file or directory, and then loads it securely without traversing outside of root.
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 ¶
LoadArchive loads from a reader containing a compressed tar archive.
func LoadArchiveFiles ¶
func LoadArchiveFiles(in io.Reader) ([]*archive.BufferedFile, error)
LoadArchiveFiles reads in files out of an archive into memory. This function performs important path security checks and should always be used before expanding a tarball
Types ¶
type FileLoader ¶
type FileLoader string
FileLoader wraps Helm's loader.FileLoader to implement the secureloader interface.
type FileLoaderV2 ¶ added in v1.8.0
FileLoaderV2 is the interface implemented by chart v2 loaders.
func Loader ¶
func Loader(root, name string) (FileLoaderV2, error)
Loader returns a new loader.ChartLoader appropriate for the given chart name. That being, SecureDirLoader when name is a directory, and FileLoader when it's a file. Name can be an absolute or relative path, but always has to be inside root.
type SecureDirLoader ¶
type SecureDirLoader struct {
// contains filtered or unexported fields
}
SecureDirLoader securely loads a chart from a directory while resolving symlinks without including files outside root.
func NewSecureDirLoader ¶
func NewSecureDirLoader(root string, path string, maxSize int64) SecureDirLoader
NewSecureDirLoader returns a new SecureDirLoader, configured to the scope of the root and provided dir. Max size configures the maximum size a file must not exceed to be loaded. If 0 it defaults to helm.MaxChartFileSize, it can be disabled using a negative integer.