internal

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

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

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, credentialsPath 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 Getter

type Getter interface {
	GetClusterKubeconfig(ctx context.Context, clusterKey ctrlclient.ObjectKey) (string, 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, credentialsPath string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error)

InstallHelmRelease installs a Helm release.

func (*HelmClient) InstallOrUpgradeHelmRelease

func (c *HelmClient) InstallOrUpgradeHelmRelease(ctx context.Context, kubeconfig string, credentialsPath 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

UninstallHelmRelease uninstalls a Helm release.

func (*HelmClient) UpgradeHelmReleaseIfChanged

func (c *HelmClient) UpgradeHelmReleaseIfChanged(ctx context.Context, kubeconfig string, credentialsPath 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, clusterKey ctrlclient.ObjectKey) (string, error)

GetClusterKubeconfig returns the kubeconfig for a selected Cluster as a string.

Directories

Path Synopsis
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.

Jump to

Keyboard shortcuts

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