helm

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChartFileName

func ChartFileName(chart string) string

Types

type ChartRegistryDownloader

type ChartRegistryDownloader struct {
	// contains filtered or unexported fields
}

func NewChartRegistryDownloader

func NewChartRegistryDownloader(client Client, dstFolder string) *ChartRegistryDownloader

func (*ChartRegistryDownloader) Download

func (d *ChartRegistryDownloader) Download(ctx context.Context, charts ...string) error

type ChartRegistryImporter

type ChartRegistryImporter struct {
	// contains filtered or unexported fields
}

func NewChartRegistryImporter

func NewChartRegistryImporter(client Client, srcFolder, registry, username, password string) *ChartRegistryImporter

func (*ChartRegistryImporter) Import

func (i *ChartRegistryImporter) Import(ctx context.Context, charts ...string) error

type Client

type Client interface {
	PushChart(ctx context.Context, chart, registry string) error
	PullChart(ctx context.Context, ociURI, version string) error
	ListCharts(ctx context.Context, kubeconfigFilePath string) ([]string, error)
	SaveChart(ctx context.Context, ociURI, version, folder string) error
	Delete(ctx context.Context, kubeconfigFilePath, installName, namespace string) error
	UpgradeChartWithValuesFile(ctx context.Context, chart, ociURI, version, kubeconfigFilePath, valuesFilePath string, opts ...Opt) error
	InstallChartWithValuesFile(ctx context.Context, chart, ociURI, version, kubeconfigFilePath, valuesFilePath string) error
	InstallChart(ctx context.Context, chart, ociURI, version, kubeconfigFilePath, namespace, valueFilePath string, skipCRDs bool, values []string) error
	Template(ctx context.Context, ociURI, version, namespace string, values interface{}, kubeVersion string) ([]byte, error)
	RegistryLogin(ctx context.Context, registry, username, password string) error
}

Client represents a Helm client.

type ClientBuilder added in v0.17.6

type ClientBuilder interface {
	BuildHelm(...Opt) Client
}

ClientBuilder builds a Helm Client.

type ClientFactory added in v0.17.6

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory provides a helm client for a cluster.

func NewClientForClusterFactory added in v0.17.6

func NewClientForClusterFactory(client client.Client, builder ClientBuilder) *ClientFactory

NewClientForClusterFactory returns a new helm ClientFactory.

func (*ClientFactory) Get added in v0.17.6

func (f *ClientFactory) Get(ctx context.Context, clus *anywherev1.Cluster) (Client, error)

Get returns a new Helm client configured using information from the provided cluster's management cluster.

type Config added in v0.17.6

type Config struct {
	RegistryMirror *registrymirror.RegistryMirror
	ProxyConfig    map[string]string
	Insecure       bool
}

Config contains configuration options for Helm.

func NewConfig added in v0.17.6

func NewConfig(opts ...Opt) *Config

NewConfig retuns a new helm Config.

type EnvClientFactory added in v0.17.6

type EnvClientFactory struct {
	// contains filtered or unexported fields
}

EnvClientFactory provides a Helm client for a cluster.

func NewEnvClientFactory added in v0.17.6

func NewEnvClientFactory(builder ClientBuilder) *EnvClientFactory

NewEnvClientFactory returns a new EnvClientFactory.

func (*EnvClientFactory) Get added in v0.17.6

Get returns the helm registry client. The parameters here are not used and it only returns the client that is initialized using Init.

func (*EnvClientFactory) Init added in v0.17.6

Init builds the helm registry client once using the registry mirror information from the cluster information. It should be called at least once first, before trying to retrieving and using the client using Get. It only builds the helm registry client once. This is not thread safe and the caller should guarantee that it does not get called from multiple threads.

type Opt added in v0.17.6

type Opt func(*Config)

Opt is a functional option for configuring Helm behavior.

func WithInsecure added in v0.17.6

func WithInsecure() Opt

WithInsecure configures helm to skip validating TLS certificates when communicating with the Kubernetes API.

func WithProxyConfig added in v0.17.6

func WithProxyConfig(proxyConfig map[string]string) Opt

WithProxyConfig sets the proxy configurations on the Config. proxyConfig contains configurations for the proxy settings used by the Helm client. The valid keys are as follows: "HTTPS_PROXY": Specifies the HTTPS proxy URL. "HTTP_PROXY": Specifies the HTTP proxy URL. "NO_PROXY": Specifies a comma-separated a list of destination domain names, domains, IP addresses, or other network CIDRs to exclude proxying.

func WithRegistryMirror added in v0.17.6

func WithRegistryMirror(mirror *registrymirror.RegistryMirror) Opt

WithRegistryMirror sets up registry mirror for helm.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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