helm

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 10 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

Types

type Chart

type Chart struct {
	ChartName       string `validate:"required" mapstructure:"chart_name"`
	Version         string `mapstructure:"version"`
	ReleaseName     string `mapstructure:"release_name"`
	Namespace       string `mapstructure:"namespace"`
	CreateNamespace *bool  `mapstructure:"create_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 `mapstructure:"values_yaml"`
}

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 Daemonset

type Daemonset struct {
	Name  string `yaml:"name"`
	Ready bool   `yaml:"ready"`
}

type Deployment

type Deployment struct {
	Name  string `yaml:"name"`
	Ready bool   `yaml:"ready"`
}

type Helm

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

func NewHelm

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

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 InstanceState

type InstanceState struct {
	Workflows Workflows
}

func (*InstanceState) ToStringInterfaceMap

func (is *InstanceState) ToStringInterfaceMap() map[string]interface{}

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 {
	Name string `validate:"required" mapstructure:"name"`
	URL  string `validate:"required" 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)

type Statefulset

type Statefulset struct {
	Name  string `yaml:"name"`
	Ready bool   `yaml:"ready"`
}

type Workflows

type Workflows struct {
	Deployments  []Deployment  `yaml:"deployments,omitempty"`
	Daemonsets   []Daemonset   `yaml:"daemonsets,omitempty"`
	Statefulsets []Statefulset `yaml:"statefulsets,omitempty"`
}

func (*Workflows) AddDaemonset

func (w *Workflows) AddDaemonset(name string, ready bool)

func (*Workflows) AddDeployment

func (w *Workflows) AddDeployment(name string, ready bool)

func (*Workflows) AddStatefulset

func (w *Workflows) AddStatefulset(name string, ready bool)

Jump to

Keyboard shortcuts

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