repo

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: 6 Imported by: 0

Documentation

Overview

Package repo resolves a release's chart reference against the declared repositories, producing the connection settings nelm needs to fetch it.

nelm has no repositories.yaml step: a helm-repo chart is fetched helm "--repo" style (chart name + repo URL), while an OCI chart is fetched by its oci:// URL with credentials supplied through a Docker config.json.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerConfig

func DockerConfig(repos map[string]config.Repository) (string, func(), error)

DockerConfig writes a temporary Docker config.json holding credentials for every OCI repository that has a username or password, and returns its path plus a cleanup func. When no OCI repository needs auth it returns ("", func(){}, nil) so callers can pass the empty path through unchanged (nelm then falls back to ~/.docker/config.json).

Types

type ChartResolution

type ChartResolution struct {
	// Ref is what to hand nelm as the chart (chart name for a helm repo, the
	// oci:// URL for OCI, or the original path for a local chart).
	Ref string
	// RepoURL is the helm chart-repository URL (empty for OCI/local).
	RepoURL string
	// Username / Password authenticate to a helm repo. For OCI these are carried
	// via a Docker config.json instead (see DockerConfig).
	Username string
	Password string
	// PassCredentials forwards basic auth beyond the repo host. Helm repos only:
	// OCI never sees Username/Password here.
	PassCredentials bool
	// Transport and verification settings of the repository the chart comes
	// from. These apply to OCI too: nelm downloads both kinds of chart through
	// the same helm getter, so the TLS material and timeout are shared.
	SkipTLSVerify      bool
	CAFile             string
	CertFile           string
	KeyFile            string
	OCIPlainHTTP       bool
	SkipUpdate         bool
	RequestTimeout     string
	ProvenanceStrategy string
	ProvenanceKeyring  string
}

ChartResolution is how to fetch one release's chart.

func Resolve

func Resolve(chartName string, repos map[string]config.Repository) ChartResolution

Resolve maps chartName plus the declared repositories to a ChartResolution:

  • oci://host/... or oci+http://host/... -> OCI. Ref is normalized to oci:// (nelm knows no other scheme) and OCIPlainHTTP records which one it was. The registry is found by address, ignoring the scheme, and contributes its transport settings — credentials excepted, they reach nelm through a Docker config.json (see DockerConfig).
  • alias/chart, where alias is a declared helm repo -> Ref = chart name, RepoURL + auth + transport from that repository.
  • anything else -> passed through unchanged (local path or bare name).

Jump to

Keyboard shortcuts

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