helm

package
v1.6.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName is the name of the Helm Botkube plugin.
	PluginName = "helm"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Commands

type Commands struct {
	Install  *InstallCommand  `arg:"subcommand:install"`
	Version  *VersionCommand  `arg:"subcommand:version"`
	Status   *StatusCommand   `arg:"subcommand:status"`
	Test     *TestCommand     `arg:"subcommand:test"`
	Rollback *RollbackCommand `arg:"subcommand:rollback"`
	Upgrade  *UpgradeCommand  `arg:"subcommand:upgrade"`
	Get      *GetCommand      `arg:"subcommand:get"`

	// embed on the root of the Command struct to inline all aliases.
	HistoryCommandAliases
	UninstallCommandAliases
	ListCommandAliases

	GlobalFlags
}

Commands defines all supported Helm plugin commands and their flags.

type Config

type Config struct {
	HelmDriver       string `yaml:"helmDriver,omitempty"`
	HelmCacheDir     string `yaml:"helmCacheDir,omitempty"`
	HelmConfigDir    string `yaml:"helmConfigDir,omitempty"`
	DefaultNamespace string `yaml:"defaultNamespace,omitempty"`
}

Config holds Helm plugin configuration parameters.

func MergeConfigs

func MergeConfigs(configs []*executor.Config) (Config, error)

MergeConfigs merges the Helm configuration.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the Helm configuration parameters.

type Executor

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

Executor provides functionality for running Helm CLI.

func NewExecutor

func NewExecutor(ver string) *Executor

NewExecutor returns a new Executor instance.

func (*Executor) Execute

Execute returns a given command as response.

Supported commands: - install - uninstall - list - version - status - test - rollback - upgrade - history - get [all|manifest|hooks|notes]

func (*Executor) Help added in v0.18.0

Help returns help message

func (*Executor) Metadata

func (e *Executor) Metadata(context.Context) (api.MetadataOutput, error)

Metadata returns details about Helm plugin.

type GetAllCommand

type GetAllCommand struct {
	Name string `arg:"positional"`

	SupportedGetAllFlags
	// contains filtered or unexported fields
}

GetAllCommand holds possible get options such as positional arguments and supported flags.

func (GetAllCommand) Help

func (GetAllCommand) Help() string

Help returns command help message.

func (GetAllCommand) Validate

func (GetAllCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type GetCommand

type GetCommand struct {
	All      *GetAllCommand      `arg:"subcommand:all"`
	Hooks    *GetHooksCommand    `arg:"subcommand:hooks"`
	Manifest *GetManifestCommand `arg:"subcommand:manifest"`
	Notes    *GetNotesCommand    `arg:"subcommand:notes"`
	Values   *GetValuesCommand   `arg:"subcommand:values"`

	SupportedGetFlags
}

GetCommand holds possible get options such as positional arguments and supported flags. Syntax:

helm get [command]

func (GetCommand) Help

func (GetCommand) Help() string

Help returns command help message.

type GetHooksCommand

type GetHooksCommand struct {
	Name string `arg:"positional"`
	// contains filtered or unexported fields
}

GetHooksCommand holds possible get options such as positional arguments and supported flags.

func (GetHooksCommand) Help

func (GetHooksCommand) Help() string

Help returns command help message.

func (GetHooksCommand) Validate

func (GetHooksCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type GetManifestCommand

type GetManifestCommand struct {
	Name string `arg:"positional"`
	// contains filtered or unexported fields
}

GetManifestCommand holds possible get options such as positional arguments and supported flags.

func (GetManifestCommand) Help

func (GetManifestCommand) Help() string

Help returns command help message.

func (GetManifestCommand) Validate

func (GetManifestCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type GetNotesCommand

type GetNotesCommand struct {
	Name string `arg:"positional"`
	// contains filtered or unexported fields
}

GetNotesCommand holds possible get options such as positional arguments and supported flags.

func (GetNotesCommand) Help

func (GetNotesCommand) Help() string

Help returns command help message.

func (GetNotesCommand) Validate

func (GetNotesCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type GetValuesCommand

type GetValuesCommand struct {
	Name string `arg:"positional"`

	SupportedGetValuesFlags
	// contains filtered or unexported fields
}

GetValuesCommand holds possible get options such as positional arguments and supported flags.

func (GetValuesCommand) Help

func (GetValuesCommand) Help() string

Help returns command help message.

func (GetValuesCommand) Validate

func (GetValuesCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type GlobalFlags

type GlobalFlags struct {
	Namespace  string `arg:"--namespace,-n"`
	Debug      bool   `arg:"--debug"`
	BurstLimit int    `arg:"--burst-limit"`
}

GlobalFlags holds flags supported by all Helm plugin commands

type HistoryCommand

type HistoryCommand struct {
	Name string `arg:"positional"`

	SupportedHistoryFlags
	// contains filtered or unexported fields
}

HistoryCommand holds possible uninstallation options such as positional arguments and supported flags. Syntax:

helm history RELEASE_NAME [flags]

func (HistoryCommand) Help

func (HistoryCommand) Help() string

Help returns command help message.

func (HistoryCommand) Validate

func (HistoryCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type HistoryCommandAliases

type HistoryCommandAliases struct {
	History *HistoryCommand `arg:"subcommand:history"`
	Ls      *HistoryCommand `arg:"subcommand:hist"`
}

HistoryCommandAliases holds different names for list subcommand. Unfortunately, it's a go-arg limitation that we cannot on a single entry have subcommand aliases.

func (HistoryCommandAliases) Get

Get returns HistoryCommand that were unpacked based on the alias used by user.

type InstallCommand

type InstallCommand struct {
	Name  string `arg:"positional"`
	Chart string `arg:"positional"`

	SupportedInstallFlags
	NotSupportedInstallFlags
}

InstallCommand holds possible installation options such as positional arguments and supported flags. Syntax:

helm install [NAME] [CHART] [flags]

func (InstallCommand) Help

func (InstallCommand) Help() string

Help returns command help message.

func (InstallCommand) Validate

func (i InstallCommand) Validate() error

Validate validates that all installation parameters are valid.

type ListCommand

type ListCommand struct {
	SupportedListFlags
	// contains filtered or unexported fields
}

ListCommand holds possible uninstallation options such as positional arguments and supported flags. Syntax:

helm list [flags]

func (ListCommand) Help

func (ListCommand) Help() string

Help returns command help message.

func (ListCommand) Validate

func (ListCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type ListCommandAliases

type ListCommandAliases struct {
	List *ListCommand `arg:"subcommand:list"`
	Ls   *ListCommand `arg:"subcommand:ls"`
}

ListCommandAliases holds different names for list subcommand. Unfortunately, it's a go-arg limitation that we cannot on a single entry have subcommand aliases.

func (ListCommandAliases) Get

Get returns ListCommand that were unpacked based on the alias used by user.

type NotSupportedInstallFlags

type NotSupportedInstallFlags struct {
	Atomic      bool     `arg:"--atomic"`
	CaFile      string   `arg:"--ca-file"`
	CertFile    string   `arg:"--cert-file"`
	KeyFile     string   `arg:"--key-file"`
	Keyring     string   `arg:"--keyring"`
	SetFile     []string `arg:"--set-file"`
	Values      []string `arg:"-f,--values"`
	Wait        bool     `arg:"--wait"`
	WaitForJobs bool     `arg:"--wait-for-jobs"`
}

NotSupportedInstallFlags represents flags supported by Helm CLI but not by Helm Plugin.

type NotSupportedRollbackFlags

type NotSupportedRollbackFlags struct {
	Wait        bool `arg:"--wait"`
	WaitForJobs bool `arg:"--wait-for-jobs"`
}

NotSupportedRollbackFlags represents flags supported by Helm CLI but not by Helm Plugin.

type NotSupportedUninstallFlags

type NotSupportedUninstallFlags struct {
	Wait bool `arg:"--wait"`
}

NotSupportedUninstallFlags represents flags supported by Helm CLI but not by Helm Plugin.

type NotSupportedUpgradeFlags

type NotSupportedUpgradeFlags struct {
	Atomic      bool     `arg:"--atomic"`
	CaFile      string   `arg:"--ca-file"`
	CertFile    string   `arg:"--cert-file"`
	KeyFile     string   `arg:"--key-file"`
	Keyring     string   `arg:"--keyring"`
	SetFile     []string `arg:"--set-file"`
	Values      []string `arg:"-f,--values"`
	Wait        bool     `arg:"--wait"`
	WaitForJobs bool     `arg:"--wait-for-jobs"`
}

NotSupportedUpgradeFlags represents flags supported by Helm CLI but not by Helm Plugin.

type RollbackCommand

type RollbackCommand struct {
	Name     string `arg:"positional"`
	Revision string `arg:"positional"`

	SupportedRollbackFlags
	NotSupportedRollbackFlags
}

RollbackCommand holds possible rollback options such as positional arguments and supported flags. Syntax:

helm RELEASE [REVISION] [flags]

func (RollbackCommand) Help

func (RollbackCommand) Help() string

Help returns command help message.

func (RollbackCommand) Validate

func (i RollbackCommand) Validate() error

Validate validates that all list parameters are valid.

type StatusCommand

type StatusCommand struct {
	Name string `arg:"positional"`

	SupportedStatusFlags
	// contains filtered or unexported fields
}

StatusCommand holds possible status options such as positional arguments and supported flags. Syntax:

helm status RELEASE_NAME [flags]

func (StatusCommand) Help

func (StatusCommand) Help() string

Help returns command help message.

func (StatusCommand) Validate

func (StatusCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type SupportedGetAllFlags

type SupportedGetAllFlags struct {
	Template string `arg:"--template"`
}

SupportedGetAllFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedGetFlags

type SupportedGetFlags struct {
	Revision int `arg:"--revision"`
}

SupportedGetFlags represents flags that are supported both by Helm CLI and Helm Plugin.

type SupportedGetValuesFlags

type SupportedGetValuesFlags struct {
	All    bool   `arg:"-a,--all"`
	Output string `arg:"-o,--output"`
}

SupportedGetValuesFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedHistoryFlags

type SupportedHistoryFlags struct {
	Max    int    `arg:"--max"`
	Output string `arg:"-o,--output"`
}

SupportedHistoryFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedInstallFlags

type SupportedInstallFlags struct {
	CreateNamespace          bool          `arg:"--create-namespace"`
	GenerateName             bool          `arg:"--generate-name,-g"`
	DependencyUpdate         bool          `arg:"--dependency-update"`
	Description              string        `arg:"--description"`
	Devel                    bool          `arg:"--devel"`
	DisableOpenAPIValidation bool          `arg:"--disable-openapi-validation"`
	DryRun                   bool          `arg:"--dry-run"`
	InsecureSkipTLSVerify    bool          `arg:"--insecure-skip-tls-verify"`
	NameTemplate             string        `arg:"--name-template"`
	NoHooks                  bool          `arg:"--no-hooks"`
	PassCredentials          bool          `arg:"--pass-credentials"`
	Password                 string        `arg:"--password"`
	PostRenderer             string        `arg:"--post-renderer"`
	PostRendererArgs         []string      `arg:"--post-renderer-args"`
	RenderSubChartNotes      bool          `arg:"--render-subchart-notes"`
	Replace                  bool          `arg:"--replace"`
	Repo                     string        `arg:"--repo"`
	Set                      []string      `arg:"--set"`
	SetJSON                  []string      `arg:"--set-json"`
	SetString                []string      `arg:"--set-string"`
	SkipCRDs                 bool          `arg:"--skip-crds"`
	Timeout                  time.Duration `arg:"--timeout"`
	Username                 string        `arg:"--username"`
	Verify                   bool          `arg:"--verify"`
	Version                  string        `arg:"--version"`
	Output                   string        `arg:"-o,--output"`
}

SupportedInstallFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedListFlags

type SupportedListFlags struct {
	All          bool   `arg:"-a,--all"`
	Namespaces   bool   `arg:"-A,--all-namespaces"`
	Date         bool   `arg:"-d,--date"`
	Deployed     bool   `arg:"--deployed"`
	Failed       bool   `arg:"--failed"`
	Max          int    `arg:"-m,--max"`
	Headers      bool   `arg:"--no-headers"`
	Offset       int    `arg:"--offset"`
	Output       string `arg:"-o,--output"`
	Pending      bool   `arg:"--pending"`
	Reverse      bool   `arg:"-r,--reverse"`
	Selector     string `arg:"-l,--selector"`
	Short        bool   `arg:"-q,--short"`
	Superseded   bool   `arg:"--superseded"`
	TimeFormat   string `arg:"--time-format"`
	Uninstalled  bool   `arg:"--uninstalled"`
	Uninstalling bool   `arg:"--uninstalling"`
	// NOTE: only the short filter flag can be used, as the --filter is already taken by the Botkube Core
	Filter string `arg:"-f"`
}

SupportedListFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedRollbackFlags

type SupportedRollbackFlags struct {
	CleanupOnFail bool          `arg:"--cleanup-on-fail"`
	DryRun        bool          `arg:"--dry-run"`
	Force         bool          `arg:"--force"`
	HistoryMax    int           `arg:"--history-max"`
	NoHooks       bool          `arg:"--no-hooks"`
	RecreatePods  bool          `arg:"--recreate-pods"`
	Timeout       time.Duration `arg:"--timeout"`
}

SupportedRollbackFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedStatusFlags

type SupportedStatusFlags struct {
	ShowDesc bool   `arg:"--show-desc"`
	Revision int    `arg:"--revision"`
	Output   string `arg:"--output"`
}

SupportedStatusFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedTestFlags

type SupportedTestFlags struct {
	Logs    bool          `arg:"--logs"`
	Timeout time.Duration `arg:"--timeout"`
}

SupportedTestFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedUninstallFlags

type SupportedUninstallFlags struct {
	Description string        `arg:"--description"`
	DryRun      bool          `arg:"--dry-run"`
	KeepHistory bool          `arg:"--keep-history"`
	NoHooks     bool          `arg:"--no-hooks"`
	Timeout     time.Duration `arg:"--timeout"`
}

SupportedUninstallFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedUpgradeFlags

type SupportedUpgradeFlags struct {
	CreateNamespace          bool          `arg:"--create-namespace"`
	CleanupOnFail            bool          `arg:"--cleanup-on-fail"`
	DependencyUpdate         bool          `arg:"--dependency-update"`
	Description              string        `arg:"--description"`
	Devel                    bool          `arg:"--devel"`
	DisableOpenAPIValidation bool          `arg:"--disable-openapi-validation"`
	Force                    bool          `arg:"--force"`
	DryRun                   bool          `arg:"--dry-run"`
	HistoryMax               int           `arg:"--history-max"`
	InsecureSkipTLSVerify    bool          `arg:"--insecure-skip-tls-verify"`
	Install                  bool          `arg:"--install,-i"`
	NoHooks                  bool          `arg:"--no-hooks"`
	PassCredentials          bool          `arg:"--pass-credentials"`
	Password                 string        `arg:"--password"`
	PostRenderer             string        `arg:"--post-renderer"`
	PostRendererArgs         []string      `arg:"--post-renderer-args"`
	RenderSubChartNotes      bool          `arg:"--render-subchart-notes"`
	Repo                     string        `arg:"--repo"`
	Set                      []string      `arg:"--set"`
	SetJSON                  []string      `arg:"--set-json"`
	SetString                []string      `arg:"--set-string"`
	SkipCRDs                 bool          `arg:"--skip-crds"`
	Timeout                  time.Duration `arg:"--timeout"`
	Username                 string        `arg:"--username"`
	Verify                   bool          `arg:"--verify"`
	ResetValues              bool          `arg:"--reset-values"`
	ReuseValues              bool          `arg:"--reuse-values"`
	Version                  string        `arg:"--version"`
	Output                   string        `arg:"-o,--output"`
}

SupportedUpgradeFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type SupportedVersionFlags

type SupportedVersionFlags struct {
	Short    bool   `arg:"--short"`
	Template string `arg:"--template"`
}

SupportedVersionFlags represent flags that are supported both by Helm CLI and Helm Plugin.

type TestCommand

type TestCommand struct {
	Name string `arg:"positional"`

	SupportedTestFlags
	// contains filtered or unexported fields
}

TestCommand holds possible test options such as positional arguments and supported flags. Syntax:

helm test [RELEASE] [flags]

func (TestCommand) Help

func (TestCommand) Help() string

Help returns command help message.

func (TestCommand) Validate

func (TestCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

type UninstallCommand

type UninstallCommand struct {
	Name []string `arg:"positional"`

	SupportedUninstallFlags
	NotSupportedUninstallFlags
}

UninstallCommand holds possible uninstallation options such as positional arguments and supported flags. Syntax:

helm uninstall RELEASE_NAME [...] [flags]

func (UninstallCommand) Help

func (UninstallCommand) Help() string

Help returns command help message.

func (UninstallCommand) Validate

func (i UninstallCommand) Validate() error

Validate validates that all uninstallation parameters are valid.

type UninstallCommandAliases

type UninstallCommandAliases struct {
	Uninstall *UninstallCommand `arg:"subcommand:uninstall"`
	Un        *UninstallCommand `arg:"subcommand:un"`
	Delete    *UninstallCommand `arg:"subcommand:delete"`
	Del       *UninstallCommand `arg:"subcommand:del"`
}

UninstallCommandAliases holds different names for uninstall subcommand. Unfortunately, it's a go-arg limitation that we cannot on a single entry have subcommand aliases.

func (UninstallCommandAliases) Get

Get returns UninstallCommand that were unpacked based on the alias used by user.

type UpgradeCommand

type UpgradeCommand struct {
	Name  string `arg:"positional"`
	Chart string `arg:"positional"`

	SupportedUpgradeFlags
	NotSupportedUpgradeFlags
}

UpgradeCommand holds possible upgrade options such as positional arguments and supported flags. Syntax:

helm upgrade [RELEASE] [CHART] [flags]

func (UpgradeCommand) Help

func (UpgradeCommand) Help() string

Help returns command help message.

func (UpgradeCommand) Validate

func (i UpgradeCommand) Validate() error

Validate validates that all list parameters are valid.

type VersionCommand

type VersionCommand struct {
	SupportedVersionFlags
	// contains filtered or unexported fields
}

VersionCommand holds possible version options such as positional arguments and supported flags. Syntax:

helm version [flags]

func (VersionCommand) Help

func (VersionCommand) Help() string

Help returns command help message.

func (VersionCommand) Validate

func (VersionCommand) Validate() error

Validate does nothing. It can be used if no validation is required, but you want to satisfy the command interface.

Jump to

Keyboard shortcuts

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