helm

package
v0.0.0-...-a96911d Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Install   = "install"
	Upgrade   = "upgrade"
	Get       = "get"
	Uninstall = "uninstall"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart struct {
	Release             string `yaml:"release"`
	Version             string `yaml:"version"`
	Namespace           string `yaml:"namespace"`
	Tgz                 `yaml:"tgz"`
	CustomizedValues    *values.Options `yaml:"customizedValues"`
	ClusterRolesToPatch []string        `yaml:"clusterRolesToPatch"`
}

type GetClient

type GetClient interface {
	Run(string) (*release.Release, error)
}

type Helper

type Helper struct {
	GetClient
	InstallClient
	InstallClientPtr *action.Install
	UpgradeClient
	UninstallClient

	Options
}

func NewHelper

func NewHelper(opts ...Option) (*Helper, error)

func (*Helper) Apply

func (h *Helper) Apply(release, namespace string) error

func (*Helper) InitApplyOperator

func (h *Helper) InitApplyOperator() error

func (*Helper) InitOperator

func (h *Helper) InitOperator(opType string) error

func (*Helper) LoadChart

func (h *Helper) LoadChart(chartPath string) error

func (*Helper) LoadLocalChartTgz

func (h *Helper) LoadLocalChartTgz(path string) error

func (*Helper) LoadRemoteChartTgz

func (h *Helper) LoadRemoteChartTgz(url string) error

func (*Helper) LoadValueFromFile

func (h *Helper) LoadValueFromFile(file string) (map[string]any, error)

func (*Helper) OverrideDefaultValues

func (h *Helper) OverrideDefaultValues(valuesToOverride values.Options) error

func (*Helper) SetAuth

func (h *Helper) SetAuth() error

func (*Helper) SetNamespace

func (h *Helper) SetNamespace(namespace string)

func (*Helper) Uninstall

func (h *Helper) Uninstall(releaseName string) error

type InstallClient

type InstallClient interface {
	RunWithContext(context.Context, *chart.Chart, map[string]any) (*release.Release, error)
}

type Option

type Option func(*Options)

func ActionConfig

func ActionConfig(action *action.Configuration) Option

func AuthFile

func AuthFile(file string) Option

func AuthType

func AuthType(authType string) Option

func ChartPath

func ChartPath(path string) Option

func CreateNamespace

func CreateNamespace(enabled bool) Option

func EnvConfig

func EnvConfig(env *cli.EnvSettings) Option

func KubeConfig

func KubeConfig(kube kubernetes.Options) Option

func Release

func Release(name string) Option

type Options

type Options struct {
	Release   string
	ChartPath string

	Chart           *chart.Chart
	Values          map[string]any
	CreateNamespace bool

	EnvConfig    *cli.EnvSettings
	ActionConfig *action.Configuration
	KubeConfig   kubernetes.Options
}
var (
	Opts *Options
)

type Tgz

type Tgz struct {
	Remote string `yaml:"remote"`
	Local  string `yaml:"local"`
}

type Tree

type Tree struct {
	Branch         string
	SparseCheckout []string
}

type UninstallClient

type UninstallClient interface {
	Run(string) (*release.UninstallReleaseResponse, error)
}

type UpgradeClient

type UpgradeClient interface {
	RunWithContext(context.Context, string, *chart.Chart, map[string]any) (*release.Release, error)
}

Jump to

Keyboard shortcuts

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