helm

package
v1.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverChartVersions added in v0.7.0

func DiscoverChartVersions(
	ctx context.Context,
	repoURL string,
	chart string,
	semverConstraint string,
	creds *Credentials,
) ([]string, error)

DiscoverChartVersions connects to the specified Helm chart repository and retrieves all available versions of the specified chart, optionally filtering by a SemVer constraint. It then returns the versions in descending order.

The repository can be either a classic chart repository (using HTTP/S) or a repository within an OCI registry. Classic chart repositories can contain differently named charts. When repoURL points to such a repository, the name argument must specify the name of the chart within the repository. In the case of a repository within an OCI registry, the URL implicitly points to a specific chart and the name argument must be empty.

The credentials argument may be nil for public repositories, but must be non-nil for private repositories.

It returns an error if the repository cannot be reached or if the versions cannot be retrieved, but it does not return an error if no versions of the chart are found in the repository.

func NewRegistryClient added in v0.9.0

func NewRegistryClient(home string) (*registry.Client, error)

func NormalizeChartRepositoryURL added in v0.5.0

func NormalizeChartRepositoryURL(repo string) string

NormalizeChartRepositoryURL normalizes a chart repository URL for purposes of comparison. Crucially, this function removes the oci:// prefix from the URL if there is one.

Types

type Credentials

type Credentials struct {
	// Username identifies a principal, which combined with the value of the
	// Password field, can be used for reading from some remote repository.
	Username string
	// Password, when combined with the principal identified by the Username
	// field, can be used for both reading from some remote repository.
	Password string
}

Credentials represents the credentials for connecting to a private Helm chart repository.

Jump to

Keyboard shortcuts

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