helm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChartNotFound = errors.New("chart not found")

Functions

This section is empty.

Types

type ChartLoader

type ChartLoader interface {
	Load(ctx context.Context, c *ChartSource) (*chart.Chart, error)
}

func NewChartLoader

func NewChartLoader(log logrus.FieldLogger) ChartLoader

type ChartSource

type ChartSource struct {
	RepoURL string `json:"repoUrl"`
	Name    string `json:"name"`
	Version string `json:"version"`
}

TODO: move?

type Client

type Client interface {
	Install(ctx context.Context, opts InstallOptions) (*release.Release, error)
	Uninstall(opts UninstallOptions) (*release.UninstallReleaseResponse, error)
	Upgrade(ctx context.Context, opts UpgradeOptions) (*release.Release, error)
	Rollback(opts RollbackOptions) error
	GetRelease(opts GetReleaseOptions) (*release.Release, error)
}

func NewClient

func NewClient(log logrus.FieldLogger, loader ChartLoader, restConfig *rest.Config) Client

type ConfigurationGetter

type ConfigurationGetter interface {
	Get(namespace string) (*action.Configuration, error)
}

ConfigurationGetter wraps helm actions configuration setup for mocking in unit tests.

type GetReleaseOptions

type GetReleaseOptions struct {
	Namespace   string
	ReleaseName string
	// Version is the helm release version, not the chart version. Setting it to 0 will get the last version.
	Version int
}

type InstallOptions

type InstallOptions struct {
	ChartSource     *ChartSource
	Namespace       string
	CreateNamespace bool
	ReleaseName     string
	ValuesOverrides map[string]interface{}
	DryRun          bool
}

type RollbackOptions

type RollbackOptions struct {
	Namespace   string
	ReleaseName string
}

type UninstallOptions

type UninstallOptions struct {
	Namespace      string
	ReleaseName    string
	IgnoreNotFound bool
	Wait           bool
}

type UpgradeOptions

type UpgradeOptions struct {
	ChartSource          *ChartSource
	Release              *release.Release
	ValuesOverrides      map[string]interface{}
	MaxHistory           int
	ResetThenReuseValues bool
	DryRun               bool
	Install              bool
}

Directories

Path Synopsis
Package mock_helm is a generated GoMock package.
Package mock_helm is a generated GoMock package.

Jump to

Keyboard shortcuts

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