chart

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package chart fetches a remote chart into the build artifact, so that a plan built where the registries are reachable can be applied where they are not.

It is `helm pull` done through the very getters nelm uses at apply time (the helm SDK vendored inside nelm), so a chart that resolves during build resolves the same way here. The published archive is written as-is: whatever it carries in charts/ travels with it, but a chart that expects its dependencies to be fetched while rendering still needs its repositories reachable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(o Options, dir string) (string, error)

Download fetches the chart into dir, creating dir if needed, and returns the path of the file it wrote (dir/<name>-<version>.tgz). With a provenance strategy set, the .prov file lands next to it.

func IsRemote

func IsRemote(ref string) bool

IsRemote reports whether a chart reference has to be fetched, i.e. whether it is anything other than a filesystem path. It follows nelm's own rule (nelm/pkg/chart: isLocalChart): only an absolute path or one spelled "./"/"../" is local — "repo/chart" and "oci://..." are not.

Types

type Options

type Options struct {
	// Ref is the chart as nelm would receive it: a bare chart name when RepoURL
	// is set, an oci:// URL for a registry, a plain name otherwise.
	Ref string
	// Version is a version or constraint ("15.x"); empty means latest.
	Version string

	// RepoURL is the helm chart-repository URL; empty for OCI.
	RepoURL  string
	Username string
	Password string
	// PassCredentials forwards basic auth beyond the repository host.
	PassCredentials bool

	SkipTLSVerify  bool
	CAFile         string
	CertFile       string
	KeyFile        string
	PlainHTTP      bool
	RequestTimeout time.Duration

	// ProvenanceStrategy / ProvenanceKeyring verify the chart's PGP signature
	// while it is fetched. Empty strategy means "never", as in nelm.
	ProvenanceStrategy string
	ProvenanceKeyring  string

	// RegistryConfigPath is a Docker config.json with OCI registry credentials;
	// empty falls back to helm's default (~/.docker/config.json).
	RegistryConfigPath string

	// Out receives the downloader's warnings; nil discards them.
	Out io.Writer
}

Options describe one chart to fetch and how to reach the repository it comes from. They mirror repo.ChartResolution — the same settings nelm would be handed at apply time — plus the version and the OCI credentials file.

Jump to

Keyboard shortcuts

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