helm

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAnnotationName added in v0.8.0

func GetAnnotationName() string

GetAnnotationName will return label key for service created by helm

func GetLabelName added in v0.8.0

func GetLabelName() string

GetAnnotationName will return label key for service created by helm

func Validate

func Validate(param *HelmParam) []error

Validate validates helm param

Types

type Chart

type Chart struct {
	// if ChartPath equals to "", then Repo.Name and Repo.URL must be set
	ChartPath   string `mapstructure:"chartPath"`
	ChartName   string `mapstructure:"chartName"`
	Version     string `mapstructure:"version"`
	ReleaseName string `mapstructure:"releaseName"`
	Namespace   string `mapstructure:"namespace"`
	Wait        *bool  `mapstructure:"wait"`
	Timeout     string `mapstructure:"timeout"` // such as "1.5h" or "2h45m", valid time units are "s", "m", "h"
	UpgradeCRDs *bool  `mapstructure:"upgradeCRDs"`
	// ValuesYaml is the values.yaml content.
	// use string instead of map[string]interface{}
	ValuesYaml string `validate:"omitempty,yaml" mapstructure:"valuesYaml"`
}

Chart is the struct containing details of a helm chart. TODO(daniel-hutao): make the Chart equals to helmclient.ChartSpec

func (*Chart) FillDefaultValue added in v0.8.0

func (chart *Chart) FillDefaultValue(defaultChart *Chart)

type Helm

type Helm struct {
	*repo.Entry
	*helmclient.ChartSpec
	helmclient.Client
}

Helm is helm implementation

func NewHelm

func NewHelm(param *HelmParam, option ...Option) (*Helm, error)

NewHelm creates a new Helm

func (*Helm) AddOrUpdateChartRepo added in v0.8.0

func (h *Helm) AddOrUpdateChartRepo(entry repo.Entry) error

func (*Helm) InstallOrUpgradeChart

func (h *Helm) InstallOrUpgradeChart() error

func (*Helm) UninstallHelmChartRelease

func (h *Helm) UninstallHelmChartRelease() (err error)

type HelmParam

type HelmParam struct {
	Repo  Repo
	Chart Chart
}

HelmParam is the struct for parameters with helm style.

type Option added in v0.8.0

type Option func(*Helm)

func WithChartSpec added in v0.8.0

func WithChartSpec(spec *helmclient.ChartSpec) Option

func WithClient added in v0.8.0

func WithClient(client helmclient.Client) Option

func WithEntry added in v0.8.0

func WithEntry(entry *repo.Entry) Option

type Repo

type Repo struct {
	// if Name or URL equals to "", then Chart.ChartPath must be set
	Name string `mapstructure:"name"`
	URL  string `mapstructure:"url"`
}

Repo is the struct containing details of a git repository. TODO(daniel-hutao): make the Repo equals to repo.Entry

func (*Repo) FillDefaultValue added in v0.8.0

func (repo *Repo) FillDefaultValue(defaultRepo *Repo)

Jump to

Keyboard shortcuts

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