helm

package
v0.8.1-beta.8 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: AGPL-3.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const ADDITIONALPROPERTIES = "additionalProperties"
View Source
const APIPath = "KB-API-PATH"

APIPath is the key name to record the API fullpath

View Source
const PROPERTIES = "properties"
View Source
const REQUIRED = "required"
View Source
const TYPE = "type"

Variables

View Source
var ErrReleaseNotDeployed = fmt.Errorf("release: not in deployed status")

Functions

func AddRepo

func AddRepo(r *repo.Entry) error

AddRepo adds a repo

func AddValueOptionsFlags

func AddValueOptionsFlags(f *pflag.FlagSet, v *values.Options)

AddValueOptionsFlags add helm value flags

func GetChartVersions

func GetChartVersions(chartName string) ([]*semver.Version, error)

func GetQuiteLog

func GetQuiteLog() action.DebugLog

func GetValues

func GetValues(release string, cfg *Config) (map[string]interface{}, error)

GetValues gives an implementation of 'helm get values' for target release

func GetVerboseLog

func GetVerboseLog() action.DebugLog

func NewActionConfig

func NewActionConfig(cfg *Config) (*action.Configuration, error)

func NewDownloader

func NewDownloader(cfg *Config) (*downloader.ChartDownloader, error)

func OutputDiff

func OutputDiff(releaseA *release.Release, releaseB *release.Release, versionA, versionB string, out io.Writer, detail bool) error

OutputDiff output the difference between different version for a chart releaseA corresponds to versionA and releaseB corresponds to versionB. if detail is true, the detailed lines in YAML will be displayed

func ReleaseNotFound

func ReleaseNotFound(err error) bool

func RemoveRepo

func RemoveRepo(r *repo.Entry) error

RemoveRepo removes a repo

func ValueOptsIsEmpty

func ValueOptsIsEmpty(valueOpts *values.Options) bool

Types

type Config

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

func NewConfig

func NewConfig(namespace string, kubeConfig string, ctx string, debug bool) *Config

func NewFakeConfig

func NewFakeConfig(namespace string) *Config

func (*Config) Namespace

func (o *Config) Namespace() string

func (*Config) SetNamespace

func (o *Config) SetNamespace(namespace string)

type InstallOpts

type InstallOpts struct {
	Name            string
	Chart           string
	Namespace       string
	Wait            bool
	Version         string
	TryTimes        int
	Login           bool
	CreateNamespace bool
	ValueOpts       *values.Options
	Timeout         time.Duration
	Atomic          bool
	DisableHooks    bool
	ForceUninstall  bool
	Upgrader        breakingchange.Upgrader

	// for helm template
	DryRun     *bool
	OutputDir  string
	IncludeCRD bool
}

func GetTemplateInstallOps

func GetTemplateInstallOps(name, chart, version, namespace string) *InstallOpts

GetTemplateInstallOps build a helm InstallOpts with dryrun to implement helm template

func (*InstallOpts) GetInstalled

func (i *InstallOpts) GetInstalled(cfg *action.Configuration) (*release.Release, error)

GetInstalled gets helm package release info if installed.

func (*InstallOpts) Install

func (i *InstallOpts) Install(cfg *Config) (*release.Release, error)

Install installs a Chart

func (*InstallOpts) RemoveRemainSecrets

func (i *InstallOpts) RemoveRemainSecrets(cfg *action.Configuration) (int, error)

func (*InstallOpts) Uninstall

func (i *InstallOpts) Uninstall(cfg *Config) error

Uninstall uninstalls a Chart

func (*InstallOpts) Upgrade

func (i *InstallOpts) Upgrade(cfg *Config) error

Upgrade will upgrade a Chart

type MappingResult

type MappingResult struct {
	Name    string
	Kind    string
	Content string
}

MappingResult to store result to diff

func ParseContent

func ParseContent(content string) (*MappingResult, error)

type Mode

type Mode string
const (
	Modified Mode = "Modified"
	Added    Mode = "Added"
	Removed  Mode = "Removed"
)

type Option

type Option func(*cli.EnvSettings)

Jump to

Keyboard shortcuts

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