Documentation
¶
Overview ¶
Package loader provides functionality for loading Helm charts from URLs. This code is copied from github.com/fluxcd/helm-controller/internal/loader with modifications for use outside the controller context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrFileNotFound is an error type used to signal 404 HTTP status code responses. ErrFileNotFound = errors.New("file not found") // ErrIntegrity signals a chart loader failed to verify the integrity of // a chart, for example due to a digest mismatch. ErrIntegrity = errors.New("integrity failure") )
Functions ¶
func NewRetryableHTTPClient ¶
func NewRetryableHTTPClient(ctx context.Context, retries int) *retryablehttp.Client
NewRetryableHTTPClient returns a new retrying HTTP client for loading artifacts. The client will retry up to the given number of times before giving up.
func SecureLoadChartFromURL ¶
SecureLoadChartFromURL attempts to download a Helm chart from the given URL using the provided client. The retrieved data is verified against the given digest before loading the chart. It returns the loaded chart.Chart, or an error. The error may be of type ErrIntegrity if the integrity check fails.
Types ¶
This section is empty.