Documentation ¶
Index ¶
- func Load(root, name string) (*chart.Chart, error)
- func LoadArchive(in io.Reader) (*chart.Chart, error)
- func LoadArchiveFiles(in io.Reader) ([]*loader.BufferedFile, error)
- func LoadFile(name string) (*chart.Chart, error)
- func Loader(root, name string) (loader.ChartLoader, error)
- func SecureLoadDir(root, path string, maxSize int64) (*chart.Chart, error)
- type FileLoader
- 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) ([]*loader.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
func Loader ¶
func Loader(root, name string) (loader.ChartLoader, 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.
Types ¶
type FileLoader ¶
type FileLoader = loader.FileLoader
FileLoader is equal to Helm's. Redeclared to avoid having to deal with multiple package imports, possibly resulting in using the non-secure directory loader.
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.