internal

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 30 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, restConfig *rest.Config) (*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, restConfig *rest.Config, credentialsPath, caFilePath string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error)
	GetHelmRelease(ctx context.Context, restConfig *rest.Config, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error)
	UninstallHelmRelease(ctx context.Context, restConfig *rest.Config, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.UninstallReleaseResponse, error)
}

type HelmClient

type HelmClient struct{}

func (*HelmClient) GetHelmRelease

func (c *HelmClient) GetHelmRelease(ctx context.Context, restConfig *rest.Config, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error)

GetHelmRelease returns a Helm release if it exists.

func (*HelmClient) InstallHelmRelease

func (c *HelmClient) InstallHelmRelease(ctx context.Context, restConfig *rest.Config, credentialsPath, caFilePath string, spec addonsv1alpha1.HelmReleaseProxySpec) (*helmRelease.Release, error)

InstallHelmRelease installs a Helm release.

func (*HelmClient) InstallOrUpgradeHelmRelease

func (c *HelmClient) InstallOrUpgradeHelmRelease(ctx context.Context, restConfig *rest.Config, credentialsPath, caFilePath 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, restConfig *rest.Config, spec addonsv1alpha1.HelmReleaseProxySpec) ([]*helmRelease.Release, error)

ListHelmReleases lists all Helm releases in a namespace.

func (*HelmClient) RollbackHelmRelease

func (c *HelmClient) RollbackHelmRelease(ctx context.Context, restConfig *rest.Config, 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, restConfig *rest.Config, credentialsPath, caFilePath string, spec addonsv1alpha1.HelmReleaseProxySpec, existing *helmRelease.Release) (*helmRelease.Release, error)

UpgradeHelmReleaseIfChanged upgrades a Helm release. The boolean refers to if an upgrade was attempted.

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