helm

package
v0.19.771 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionConfigV3

func ActionConfigV3(log *zap.Logger, kubeCfg *rest.Config, ns string) (*actionV3.Configuration, error)

func ChartPathOptions

func ChartPathOptions(repository, chart, version string) (*action.ChartPathOptions, string, error)

func ChartValues

func ChartValues(values []string, helmSet []plantypes.HelmValue) (map[string]interface{}, error)

func Client

func Client(log *zap.Logger, kubeCfg *rest.Config, ns string) (*action.Configuration, error)

func ClientV2

func ClientV2(log *zap.Logger, kubeCfg *rest.Config, ns string) (*action.Configuration, error)

ClientV2 initializes a new Helm client with the given logger and kube config. NOTE: it doesn't initialise the release store.

func ConfigureDefaultInstall

func ConfigureDefaultInstall(client *action.Install) *action.Install

useful in case we want to configure a client that has already been created NOTE(fd): these default values were yoinked from the runner install code

func ConfigureDefaultUpgrade

func ConfigureDefaultUpgrade(client *action.Upgrade) *action.Upgrade

func DefaultInstall

func DefaultInstall(actionCfg *action.Configuration) *action.Install

func DefaultUpgrade

func DefaultUpgrade(actionCfg *action.Configuration) *action.Upgrade

func GetChart

func GetChart(name string, cpo *action.ChartPathOptions, settings *cli.EnvSettings) (*chart.Chart, string, error)

func GetChartByPath

func GetChartByPath(urlOrPath string) (*chart.Chart, error)

func GetManifest

func GetManifest(cfg *action.Configuration, name string) (any, error)

func GetRelease

func GetRelease(cfg *action.Configuration, name string) (*release.Release, error)

func HelmInstallWithLogStreaming

func HelmInstallWithLogStreaming(
	ctx context.Context,
	client *action.Install, chart *chart.Chart, values map[string]interface{},
	kubeCfg *rest.Config,
	l *zap.Logger,
) (*release.Release, error)

func HelmUpgradeWithLogStreaming

func HelmUpgradeWithLogStreaming(
	ctx context.Context,
	client *action.Upgrade, releaseName string, chart *chart.Chart, values map[string]interface{},
	kubeCfg *rest.Config,
	l *zap.Logger,
) (*release.Release, error)

func LoadEnvSettings

func LoadEnvSettings() (*cli.EnvSettings, error)

func Logger

func Logger(l *zap.Logger) func(string, ...interface{})

func NewLogger

func NewLogger(debugEnabled DebugEnabledFunc) *slog.Logger

NewLogger creates a new logger with dynamic debug checking

func ResolveChartName

func ResolveChartName(repository, name string) (string, string, error)

resolveChartName returns the proper repository and name values that the ChartPathOptions need. This is copied from Terraform.

Types

type DebugCheckHandler

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

DebugCheckHandler checks settings.Debug at log time

func (*DebugCheckHandler) Enabled

func (h *DebugCheckHandler) Enabled(_ context.Context, level slog.Level) bool

Enabled implements slog.Handler.Enabled

func (*DebugCheckHandler) Handle

func (h *DebugCheckHandler) Handle(ctx context.Context, r slog.Record) error

Handle implements slog.Handler.Handle

func (*DebugCheckHandler) WithAttrs

func (h *DebugCheckHandler) WithAttrs(attrs []slog.Attr) slog.Handler

WithAttrs implements slog.Handler.WithAttrs

func (*DebugCheckHandler) WithGroup

func (h *DebugCheckHandler) WithGroup(name string) slog.Handler

WithGroup implements slog.Handler.WithGroup

type DebugEnabledFunc

type DebugEnabledFunc func() bool

DebugEnabledFunc is a function type that determines if debug logging is enabled We use a function because we want to check the setting at log time, not when the logger is created

type LogStreamer

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

func NewLogStreamer

func NewLogStreamer(clientset *kubernetes.Clientset, l *zap.Logger) *LogStreamer

func (*LogStreamer) StopAllStreams

func (ls *LogStreamer) StopAllStreams()

func (*LogStreamer) StopStream

func (ls *LogStreamer) StopStream(podIdentifier string)

func (*LogStreamer) StreamPodLogs

func (ls *LogStreamer) StreamPodLogs(ctx context.Context, pods []*corev1.Pod) error

this is the entrypoint

func (*LogStreamer) Wait

func (ls *LogStreamer) Wait()

type RestClientGetter

type RestClientGetter struct {
	Namespace  string
	RestConfig *rest.Config
	Clientset  kubernetes.Interface
}

RestClientGetter is a RESTClientGetter interface implementation for the Helm Go packages.

func (*RestClientGetter) ToDiscoveryClient

func (k *RestClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)

ToDiscoveryClient implemented interface method

func (*RestClientGetter) ToRESTConfig

func (k *RestClientGetter) ToRESTConfig() (*rest.Config, error)

ToRESTConfig implemented interface method

func (*RestClientGetter) ToRESTMapper

func (k *RestClientGetter) ToRESTMapper() (meta.RESTMapper, error)

ToRESTMapper implemented interface method

func (*RestClientGetter) ToRawKubeConfigLoader

func (k *RestClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig

ToRawKubeConfigLoader implemented interface method

Directories

Path Synopsis
TODO: Is this file needed?
TODO: Is this file needed?

Jump to

Keyboard shortcuts

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