helm

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 16 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 {
	Retrier retrier.Retrier
	// 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, filter string) ([]string, error)
	SaveChart(ctx context.Context, ociURI, version, folder string) error
	Delete(ctx context.Context, kubeconfigFilePath, installName, namespace string) error
	UpgradeInstallChartWithValuesFile(ctx context.Context, chart, ociURI, version, kubeconfigFilePath, namespace, valuesFilePath string, opts ...Opt) error
	InstallChart(ctx context.Context, chart, ociURI, version, kubeconfigFilePath, namespace, valueFilePath string, skipCRDs bool, values []string) error
	Uninstall(ctx context.Context, chart, kubeconfigFilePath, namespace string, opts ...Opt) 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
	ExtraFlags     []string
}

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 WithExtraFlags added in v0.20.0

func WithExtraFlags(extraFlags []string) Opt

WithExtraFlags configures the extra flags to pass to helm.

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