Documentation ¶
Index ¶
- func GetActionConfig(ctx context.Context, namespace string, config *rest.Config) (*helmAction.Configuration, error)
- func HelmInit(ctx context.Context, namespace string, kubeconfig string) (*helmCli.EnvSettings, *helmAction.Configuration, error)
- func ParseValues(ctx context.Context, c ctrlClient.Client, ...) (string, error)
- type Client
- type Getter
- type HelmClient
- func (c *HelmClient) GetHelmRelease(ctx context.Context, kubeconfig string, ...) (*helmRelease.Release, error)
- func (c *HelmClient) InstallHelmRelease(ctx context.Context, kubeconfig string, ...) (*helmRelease.Release, error)
- func (c *HelmClient) InstallOrUpgradeHelmRelease(ctx context.Context, kubeconfig string, ...) (*helmRelease.Release, error)
- func (c *HelmClient) ListHelmReleases(ctx context.Context, kubeconfig string, ...) ([]*helmRelease.Release, error)
- func (c *HelmClient) RollbackHelmRelease(ctx context.Context, kubeconfig string, ...) error
- func (c *HelmClient) UninstallHelmRelease(ctx context.Context, kubeconfig string, ...) (*helmRelease.UninstallReleaseResponse, error)
- func (c *HelmClient) UpgradeHelmReleaseIfChanged(ctx context.Context, kubeconfig string, ...) (*helmRelease.Release, error)
- type KubeconfigGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActionConfig ¶
func GetActionConfig(ctx context.Context, namespace string, config *rest.Config) (*helmAction.Configuration, error)
GetActionConfig returns a new Helm action configuration.
func HelmInit ¶
func HelmInit(ctx context.Context, namespace string, kubeconfig string) (*helmCli.EnvSettings, *helmAction.Configuration, error)
HelmInit initializes Helm.
func ParseValues ¶
func ParseValues(ctx context.Context, c ctrlClient.Client, spec addonsv1alpha1.HelmChartProxySpec, cluster *clusterv1.Cluster) (string, error)
ParseValues parses the values template and returns the expanded template. It attempts to populate a map of supported templating objects.
Types ¶
type Client ¶
type Client interface { InstallOrUpgradeHelmRelease(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error) GetHelmRelease(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error) UninstallHelmRelease(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.UninstallReleaseResponse, error) }
type HelmClient ¶
type HelmClient struct{}
func (*HelmClient) GetHelmRelease ¶
func (c *HelmClient) GetHelmRelease(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error)
GetHelmRelease returns a Helm release if it exists.
func (*HelmClient) InstallHelmRelease ¶
func (c *HelmClient) InstallHelmRelease(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error)
InstallHelmRelease installs a Helm release.
func (*HelmClient) InstallOrUpgradeHelmRelease ¶
func (c *HelmClient) InstallOrUpgradeHelmRelease(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error)
InstallOrUpgradeHelmRelease installs a Helm release if it does not exist, or upgrades it if it does and differs from the spec. It returns a boolean indicating whether an install or upgrade was performed.
func (*HelmClient) ListHelmReleases ¶
func (c *HelmClient) ListHelmReleases(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) ([]*helmRelease.Release, error)
ListHelmReleases lists all Helm releases in a namespace.
func (*HelmClient) RollbackHelmRelease ¶
func (c *HelmClient) RollbackHelmRelease(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) error
RollbackHelmRelease rolls back a Helm release.
func (*HelmClient) UninstallHelmRelease ¶
func (c *HelmClient) UninstallHelmRelease(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.UninstallReleaseResponse, error)
UninstallHelmRelease uninstalls a Helm release.
func (*HelmClient) UpgradeHelmReleaseIfChanged ¶
func (c *HelmClient) UpgradeHelmReleaseIfChanged(ctx context.Context, kubeconfig string, spec addonsv1alpha1.HelmReleaseProxySpec, existing *helmRelease.Release) (*helmRelease.Release, error)
UpgradeHelmReleaseIfChanged upgrades a Helm release. The boolean refers to if an upgrade was attempted.
type KubeconfigGetter ¶
type KubeconfigGetter struct{}
func (*KubeconfigGetter) GetClusterKubeconfig ¶
func (k *KubeconfigGetter) GetClusterKubeconfig(ctx context.Context, cluster *clusterv1.Cluster) (string, error)
GetClusterKubeconfig returns the kubeconfig for a selected Cluster as a string.