Documentation
¶
Index ¶
- func GetHelmVersion(helmBinary string, runner Runner) (*semver.Version, error)
- func GetPluginVersion(name, pluginsDir string) (*semver.Version, error)
- func Indent(text, indent string) string
- func LiveOutput(ctx context.Context, c *exec.Cmd, stripArgsValuesOnExitError bool, ...) ([]byte, error)
- func New(helmBinary string, options HelmExecOptions, logger *zap.SugaredLogger, ...) *execer
- func NewLogger(writer io.Writer, logLevel string) *zap.SugaredLogger
- func Output(ctx context.Context, c *exec.Cmd, stripArgsValuesOnExitError bool, ...) ([]byte, error)
- type DependencyUpdater
- type ExitError
- type HelmContext
- type HelmExecOptions
- type Interface
- type Runner
- type ShellRunner
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHelmVersion ¶ added in v0.148.0
func GetPluginVersion ¶ added in v0.146.0
func LiveOutput ¶ added in v0.146.0
func New ¶
func New(helmBinary string, options HelmExecOptions, logger *zap.SugaredLogger, kubeconfig string, kubeContext string, runner Runner) *execer
New for running helm commands
Types ¶
type DependencyUpdater ¶
type ExitError ¶
ExitError is created whenever your shell command exits with a non-zero exit status
func (ExitError) ExitStatus ¶
type HelmExecOptions ¶ added in v0.153.0
type Interface ¶
type Interface interface {
SetExtraArgs(args ...string)
SetHelmBinary(bin string)
SetEnableLiveOutput(enableLiveOutput bool)
SetDisableForceUpdate(forceUpdate bool)
AddRepo(name, repository, cafile, certfile, keyfile, username, password string, managed string, passCredentials, skipTLSVerify bool) error
UpdateRepo() error
RegistryLogin(name, username, password, caFile, certFile, keyFile string, skipTLSVerify bool) error
BuildDeps(name, chart string, flags ...string) error
UpdateDeps(chart string) error
SyncRelease(context HelmContext, name, chart string, flags ...string) error
DiffRelease(context HelmContext, name, chart string, suppressDiff bool, flags ...string) error
TemplateRelease(name, chart string, flags ...string) error
Fetch(chart string, flags ...string) error
ChartPull(chart string, path string, flags ...string) error
ChartExport(chart string, path string) error
Lint(name, chart string, flags ...string) error
ReleaseStatus(context HelmContext, name string, flags ...string) error
DeleteRelease(context HelmContext, name string, flags ...string) error
TestRelease(context HelmContext, name string, flags ...string) error
List(context HelmContext, filter string, flags ...string) (string, error)
DecryptSecret(context HelmContext, name string, flags ...string) (string, error)
IsHelm3() bool
GetVersion() Version
IsVersionAtLeast(versionStr string) bool
ShowChart(chart string) (chart.Metadata, error)
}
Interface for executing helm commands
type Runner ¶
type Runner interface {
Execute(cmd string, args []string, env map[string]string, enableLiveOutput bool) ([]byte, error)
ExecuteStdIn(cmd string, args []string, env map[string]string, stdin io.Reader) ([]byte, error)
}
Runner interface for shell commands
type ShellRunner ¶
type ShellRunner struct {
Dir string
StripArgsValuesOnExitError bool
Logger *zap.SugaredLogger
Ctx context.Context
}
ShellRunner implemention for shell commands
Click to show internal directories.
Click to hide internal directories.