Documentation ¶
Index ¶
Constants ¶
View Source
const (
// PluginName is the name of the Helm Botkube plugin.
PluginName = "kubectl"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryRunner ¶
type BinaryRunner struct {
// contains filtered or unexported fields
}
BinaryRunner runs a kubectl binary.
func NewBinaryRunner ¶
func NewBinaryRunner() *BinaryRunner
NewBinaryRunner returns a new BinaryRunner instance.
func (*BinaryRunner) RunKubectlCommand ¶
func (e *BinaryRunner) RunKubectlCommand(ctx context.Context, kubeConfigPath, defaultNamespace, cmd string) (string, error)
RunKubectlCommand runs a Kubectl CLI command and run output.
type Config ¶
type Config struct { Log config.Logger `yaml:"log"` DefaultNamespace string `yaml:"defaultNamespace,omitempty"` InteractiveBuilder builder.Config `yaml:"interactiveBuilder,omitempty"` }
Config holds Kubectl plugin configuration parameters.
func MergeConfigs ¶
MergeConfigs merges the Kubectl configuration.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor provides functionality for running Helm CLI.
func NewExecutor ¶
NewExecutor returns a new Executor instance.
func (*Executor) Execute ¶
func (e *Executor) Execute(ctx context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error)
Execute returns a given command as response.
type KubeconfigScopedRunner ¶ added in v1.1.0
type KubeconfigScopedRunner struct {
// contains filtered or unexported fields
}
KubeconfigScopedRunner is a runner that executes kubectl commands using a specific kubeconfig file.
func NewKubeconfigScopedRunner ¶ added in v1.1.0
func NewKubeconfigScopedRunner(underlying kcRunner, kubeconfigPath string) *KubeconfigScopedRunner
NewKubeconfigScopedRunner creates a new instance of KubeconfigScopedRunner.
func (*KubeconfigScopedRunner) RunKubectlCommand ¶ added in v1.1.0
func (k *KubeconfigScopedRunner) RunKubectlCommand(ctx context.Context, defaultNamespace, cmd string) (string, error)
RunKubectlCommand runs a kubectl CLI command scoped to configured kubeconfig.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.