archive

package
v2.0.1-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

archive provides utility functions for working with Helm chart archive files

Index

Constants

This section is empty.

Variables

View Source
var MaxDecompressedChartSize int64 = 100 * 1024 * 1024 // Default 100 MiB

MaxDecompressedChartSize is the maximum size of a chart archive that will be decompressed. This is the decompressed size of all the files. The default value is 100 MiB.

View Source
var MaxDecompressedFileSize int64 = 5 * 1024 * 1024 // Default 5 MiB

MaxDecompressedFileSize is the size of the largest file that Helm will attempt to load. The size of the file is the decompressed version of it when it is stored in an archive.

Functions

func EnsureArchive

func EnsureArchive(name string, raw *os.File) error

ensureArchive's job is to return an informative error if the file does not appear to be a gzipped archive.

Sometimes users will provide a values.yaml for an argument where a chart is expected. One common occurrence of this is invoking `helm template values.yaml mychart` which would otherwise produce a confusing error if we didn't check for this.

Types

type BufferedFile

type BufferedFile struct {
	Name    string
	ModTime time.Time
	Data    []byte
}

BufferedFile represents an archive file buffered for later processing.

func LoadArchiveFiles

func LoadArchiveFiles(in io.Reader) ([]*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

Jump to

Keyboard shortcuts

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