Documentation
¶
Index ¶
- Constants
- func NewExecutor(ver string) executor.Executor
- type Commands
- type Config
- type Executor
- type GetAllCommand
- type GetCommand
- type GetHooksCommand
- type GetManifestCommand
- type GetNotesCommand
- type GetValuesCommand
- type GlobalFlags
- type HistoryCommand
- type HistoryCommandAliases
- type InstallCommand
- type ListCommand
- type ListCommandAliases
- type NotSupportedInstallFlags
- type NotSupportedRollbackFlags
- type NotSupportedUninstallFlags
- type NotSupportedUpgradeFlags
- type RollbackCommand
- type StatusCommand
- type SupportedGetAllFlags
- type SupportedGetFlags
- type SupportedGetValuesFlags
- type SupportedHistoryFlags
- type SupportedInstallFlags
- type SupportedListFlags
- type SupportedRollbackFlags
- type SupportedStatusFlags
- type SupportedTestFlags
- type SupportedUninstallFlags
- type SupportedUpgradeFlags
- type SupportedVersionFlags
- type TestCommand
- type UninstallCommand
- type UninstallCommandAliases
- type UpgradeCommand
- type VersionCommand
Constants ¶
const (
// PluginName is the name of the Helm Botkube plugin.
PluginName = "helm"
)
Variables ¶
This section is empty.
Functions ¶
func NewExecutor ¶
NewExecutor returns a new Executor instance.
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 {
DefaultNamespace string `yaml:"defaultNamespace,omitempty"`
HelmDriver string `yaml:"helmDriver,omitempty"`
// Fields not exposed to the user in the JSON schema
HelmCacheDir string `yaml:"helmCacheDir,omitempty"`
HelmConfigDir string `yaml:"helmConfigDir,omitempty"`
}
Config holds Helm plugin configuration parameters.
func MergeConfigs ¶
MergeConfigs merges the Helm configuration.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor provides functionality for running Helm CLI.
func (*Executor) Execute ¶
func (e *Executor) Execute(ctx context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error)
Execute returns a given command as response.
Supported commands: - install - uninstall - list - version - status - test - rollback - upgrade - history - get [all|manifest|hooks|notes]
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.
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]
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.
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.
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.
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.
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]
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 ¶
func (u HistoryCommandAliases) Get() *HistoryCommand
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) 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]
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 ¶
func (u ListCommandAliases) Get() *ListCommand
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]
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 ¶
SupportedGetValuesFlags represent flags that are supported both by Helm CLI and Helm Plugin.
type SupportedHistoryFlags ¶
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 ¶
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 ¶
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]
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 ¶
func (u UninstallCommandAliases) Get() *UninstallCommand
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) 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]