registry

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package registry provides backends for publishing packaged Helm charts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeIndex

func MergeIndex(dst, src *helmrepo.IndexFile)

MergeIndex merges src into dst, adding any chart versions not already present. This is the pure logic extracted for unit testing.

Types

type ChartMuseumPublisher

type ChartMuseumPublisher struct {
	// BaseURL is the ChartMuseum URL, e.g. "https://charts.my-org.com".
	BaseURL string
	// Username and Password for basic auth (optional).
	Username string
	Password string
}

ChartMuseumPublisher pushes charts to a ChartMuseum or Harbor instance.

func (*ChartMuseumPublisher) Push

func (p *ChartMuseumPublisher) Push(chartDir, _ string) error

Push packages the chart at chartDir and uploads it via the ChartMuseum API.

type GitHubPagesPublisher

type GitHubPagesPublisher struct {
	// RepoURL is the HTTPS URL of the chart repository served via GitHub Pages,
	// e.g. "https://my-org.github.io/helm-charts".
	RepoURL string
	// RepoPath is the local path to the git repository.
	RepoPath string
	// Branch is the GitHub Pages branch (default "gh-pages").
	Branch string
}

GitHubPagesPublisher packages the chart, merges it into the repository's existing index.yaml (fetched from the gh-pages branch), and pushes the result back.

func (*GitHubPagesPublisher) Push

func (p *GitHubPagesPublisher) Push(chartDir, version string) error

Push packages the chart at chartDir, fetches the gh-pages branch, merges the new chart into the index, and pushes the updated branch.

type OCIPublisher

type OCIPublisher struct {
	// RegistryURL is the OCI registry URL, e.g. "oci://ghcr.io/my-org/helm-charts".
	RegistryURL string
	// Username and Password for registry authentication.
	Username string
	Password string
}

OCIPublisher pushes charts to an OCI-compliant registry (GHCR, ECR, ACR…).

func (*OCIPublisher) Push

func (p *OCIPublisher) Push(chartDir, version string) error

Push packages the chart at chartDir and pushes it to the OCI registry.

type Publisher

type Publisher interface {
	// Push packages the chart at chartDir and publishes it to the registry.
	Push(chartDir, version string) error
}

Publisher is the interface implemented by all registry backends.

Jump to

Keyboard shortcuts

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