Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChartFileName ¶
Types ¶
type ChartRegistryDownloader ¶
type ChartRegistryDownloader struct {
// contains filtered or unexported fields
}
func NewChartRegistryDownloader ¶
func NewChartRegistryDownloader(client Client, dstFolder string) *ChartRegistryDownloader
type ChartRegistryImporter ¶
type ChartRegistryImporter struct {
// contains filtered or unexported fields
}
func NewChartRegistryImporter ¶
func NewChartRegistryImporter(client Client, srcFolder, registry, username, password string) *ChartRegistryImporter
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
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.
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
func (f *EnvClientFactory) Get(_ context.Context, _ *anywherev1.Cluster) (Client, error)
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
func (f *EnvClientFactory) Init(ctx context.Context, r *registrymirror.RegistryMirror, opts ...Opt) error
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
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.