helm

package
v1.21.5 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DefaultHelmBinPath          = "helm"
	DefaultHelmPostRendererPath = "./post-renderer"
)
View Source
const (
	Helm3Lib = ClientType("Helm3Lib")
	Nelm     = ClientType("Nelm")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory added in v1.1.0

type ClientFactory struct {
	NewClientFn func(logger *log.Logger, labels map[string]string) client.HelmClient
	ClientType  ClientType
	// contains filtered or unexported fields
}

func InitHelmClientFactory added in v1.1.0

func InitHelmClientFactory(helmopts *Options, labels map[string]string) (*ClientFactory, error)

func (*ClientFactory) NewClient added in v1.1.0

func (f *ClientFactory) NewClient(logger *log.Logger, options ...ClientOption) client.HelmClient

type ClientOption added in v1.6.2

type ClientOption func(client.HelmClient)

func WithExtraLabels added in v1.6.2

func WithExtraLabels(labels map[string]string) ClientOption

func WithLogLabels added in v1.6.2

func WithLogLabels(logLabels map[string]string) ClientOption

type ClientType added in v1.1.0

type ClientType string

func DetectHelmVersion

func DetectHelmVersion() (ClientType, error)

type FallbackClient added in v1.21.5

type FallbackClient struct {
	// contains filtered or unexported fields
}

FallbackClient wraps a primary HelmClient (nelm) and falls back to a secondary HelmClient (helm3lib) when the primary returns one of the well-known nelm errors that helm3lib is able to recover from: action.ErrBuildPlan and resource.ErrResourceDuplicatesFound.

Read-only methods are always served by the primary client, both clients receive label/annotation updates so the fallback is ready to take over at any moment.

When MetricStorage is configured the client increments metrics.HelmFallbackTotal{module, operation, error_type} on every fallback.

func NewFallbackClient added in v1.21.5

func NewFallbackClient(primary, fallback client.HelmClient, logger *log.Logger, metricStorage MetricStorage) *FallbackClient

NewFallbackClient builds a FallbackClient. metricStorage is optional; when nil no fallback metric is emitted.

func (*FallbackClient) DeleteRelease added in v1.21.5

func (c *FallbackClient) DeleteRelease(releaseName string) error

func (*FallbackClient) GetReleaseChecksum added in v1.21.5

func (c *FallbackClient) GetReleaseChecksum(releaseName string) (string, error)

func (*FallbackClient) GetReleaseLabels added in v1.21.5

func (c *FallbackClient) GetReleaseLabels(releaseName, labelName string) (string, error)

func (*FallbackClient) GetReleaseValues added in v1.21.5

func (c *FallbackClient) GetReleaseValues(releaseName string) (utils.Values, error)

func (*FallbackClient) IsReleaseExists added in v1.21.5

func (c *FallbackClient) IsReleaseExists(releaseName string) (bool, error)

func (*FallbackClient) LastReleaseStatus added in v1.21.5

func (c *FallbackClient) LastReleaseStatus(releaseName string) (string, string, error)

func (*FallbackClient) ListReleasesNames added in v1.21.5

func (c *FallbackClient) ListReleasesNames() ([]string, error)

func (*FallbackClient) Render added in v1.21.5

func (c *FallbackClient) Render(releaseName, chart string, valuesPaths, setValues []string, releaseLabels map[string]string, namespace string, debug bool) (string, error)

func (*FallbackClient) UpgradeRelease added in v1.21.5

func (c *FallbackClient) UpgradeRelease(releaseName, chart string, valuesPaths, setValues []string, releaseLabels map[string]string, namespace string) error

func (*FallbackClient) WithExtraLabels added in v1.21.5

func (c *FallbackClient) WithExtraLabels(labels map[string]string)

func (*FallbackClient) WithLogLabels added in v1.21.5

func (c *FallbackClient) WithLogLabels(logLabels map[string]string)

type MetricStorage added in v1.21.5

type MetricStorage interface {
	CounterAdd(metric string, value float64, labels map[string]string)
}

MetricStorage is the minimal counter-emitting surface FallbackClient needs. It is intentionally small so the helm package does not depend on the full metrics-storage interface.

type Options added in v1.6.0

type Options struct {
	Namespace         string
	HistoryMax        int32
	Timeout           time.Duration
	HelmIgnoreRelease string
	Logger            *log.Logger
	// MetricStorage is optional. When set, the fallback client emits a counter
	// every time it falls back from nelm to helm3lib.
	MetricStorage MetricStorage
}

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

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