Documentation
¶
Index ¶
- Constants
- type ApplyOptions
- type CommandBuilder
- func ApplyResource(filename string, namespace string, options ApplyOptions) *CommandBuilder
- func ArgoRolloutsBuilder() *CommandBuilder
- func ArgoRolloutsGet(rolloutName, namespace string) *CommandBuilder
- func CiliumBuilder() *CommandBuilder
- func CiliumStatus() *CommandBuilder
- func DeleteResource(resourceType, resourceName, namespace string, options DeleteOptions) *CommandBuilder
- func DescribeResource(resourceType, resourceName, namespace string) *CommandBuilder
- func GetDeployments(namespace string, labels map[string]string) *CommandBuilder
- func GetLogs(podName, namespace string, options LogOptions) *CommandBuilder
- func GetPods(namespace string, labels map[string]string) *CommandBuilder
- func GetServices(namespace string, labels map[string]string) *CommandBuilder
- func HelmBuilder() *CommandBuilder
- func HelmInstall(releaseName, chart, namespace string, options HelmInstallOptions) *CommandBuilder
- func HelmList(namespace string, options HelmListOptions) *CommandBuilder
- func IstioCtlBuilder() *CommandBuilder
- func IstioProxyStatus(podName, namespace string) *CommandBuilder
- func KubectlBuilder() *CommandBuilder
- func NewCommandBuilder(command string) *CommandBuilder
- func (cb *CommandBuilder) Build() (string, []string, error)
- func (cb *CommandBuilder) Execute(ctx context.Context) (string, error)
- func (cb *CommandBuilder) WithAnnotation(key, value string) *CommandBuilder
- func (cb *CommandBuilder) WithArgs(args ...string) *CommandBuilder
- func (cb *CommandBuilder) WithCache(cached bool) *CommandBuilder
- func (cb *CommandBuilder) WithCacheKey(key string) *CommandBuilder
- func (cb *CommandBuilder) WithCacheTTL(ttl time.Duration) *CommandBuilder
- func (cb *CommandBuilder) WithContext(context string) *CommandBuilder
- func (cb *CommandBuilder) WithDryRun(dryRun bool) *CommandBuilder
- func (cb *CommandBuilder) WithForce(force bool) *CommandBuilder
- func (cb *CommandBuilder) WithKubeconfig(kubeconfig string) *CommandBuilder
- func (cb *CommandBuilder) WithLabel(key, value string) *CommandBuilder
- func (cb *CommandBuilder) WithLabels(labels map[string]string) *CommandBuilder
- func (cb *CommandBuilder) WithNamespace(namespace string) *CommandBuilder
- func (cb *CommandBuilder) WithOutput(output string) *CommandBuilder
- func (cb *CommandBuilder) WithTimeout(timeout time.Duration) *CommandBuilder
- func (cb *CommandBuilder) WithToken(token string) *CommandBuilder
- func (cb *CommandBuilder) WithValidation(validate bool) *CommandBuilder
- func (cb *CommandBuilder) WithWait(wait bool) *CommandBuilder
- type DeleteOptions
- type HelmInstallOptions
- type HelmListOptions
- type LogOptions
Constants ¶
const ( // DefaultTimeout is the default timeout for command execution DefaultTimeout = 2 * time.Minute // DefaultCacheTTL is the default cache TTL DefaultCacheTTL = 1 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyOptions ¶
ApplyOptions represents options for apply commands
type CommandBuilder ¶
type CommandBuilder struct {
// contains filtered or unexported fields
}
CommandBuilder provides a fluent interface for building CLI commands
func ApplyResource ¶
func ApplyResource(filename string, namespace string, options ApplyOptions) *CommandBuilder
ApplyResource creates a command to apply a resource
func ArgoRolloutsBuilder ¶
func ArgoRolloutsBuilder() *CommandBuilder
ArgoRolloutsBuilder creates an argo rollouts command builder
func ArgoRolloutsGet ¶
func ArgoRolloutsGet(rolloutName, namespace string) *CommandBuilder
ArgoRolloutsGet creates a command to get Argo rollouts
func CiliumBuilder ¶
func CiliumBuilder() *CommandBuilder
CiliumBuilder creates a cilium command builder
func CiliumStatus ¶
func CiliumStatus() *CommandBuilder
CiliumStatus creates a command to get Cilium status
func DeleteResource ¶
func DeleteResource(resourceType, resourceName, namespace string, options DeleteOptions) *CommandBuilder
DeleteResource creates a command to delete a resource
func DescribeResource ¶
func DescribeResource(resourceType, resourceName, namespace string) *CommandBuilder
DescribeResource creates a command to describe a resource
func GetDeployments ¶
func GetDeployments(namespace string, labels map[string]string) *CommandBuilder
GetDeployments creates a command to get deployments
func GetLogs ¶
func GetLogs(podName, namespace string, options LogOptions) *CommandBuilder
GetLogs creates a command to get logs
func GetPods ¶
func GetPods(namespace string, labels map[string]string) *CommandBuilder
GetPods creates a command to get pods
func GetServices ¶
func GetServices(namespace string, labels map[string]string) *CommandBuilder
GetServices creates a command to get services
func HelmInstall ¶
func HelmInstall(releaseName, chart, namespace string, options HelmInstallOptions) *CommandBuilder
HelmInstall creates a command to install a Helm chart
func HelmList ¶
func HelmList(namespace string, options HelmListOptions) *CommandBuilder
HelmList creates a command to list Helm releases
func IstioCtlBuilder ¶
func IstioCtlBuilder() *CommandBuilder
IstioCtlBuilder creates an istioctl command builder
func IstioProxyStatus ¶
func IstioProxyStatus(podName, namespace string) *CommandBuilder
IstioProxyStatus creates a command to get Istio proxy status
func KubectlBuilder ¶
func KubectlBuilder() *CommandBuilder
KubectlBuilder creates a kubectl command builder
func NewCommandBuilder ¶
func NewCommandBuilder(command string) *CommandBuilder
NewCommandBuilder creates a new command builder
func (*CommandBuilder) Build ¶
func (cb *CommandBuilder) Build() (string, []string, error)
Build constructs the final command arguments
func (*CommandBuilder) Execute ¶
func (cb *CommandBuilder) Execute(ctx context.Context) (string, error)
Execute runs the command
func (*CommandBuilder) WithAnnotation ¶
func (cb *CommandBuilder) WithAnnotation(key, value string) *CommandBuilder
WithAnnotation adds an annotation
func (*CommandBuilder) WithArgs ¶
func (cb *CommandBuilder) WithArgs(args ...string) *CommandBuilder
WithArgs adds arguments to the command
func (*CommandBuilder) WithCache ¶
func (cb *CommandBuilder) WithCache(cached bool) *CommandBuilder
WithCache enables caching of the command result
func (*CommandBuilder) WithCacheKey ¶
func (cb *CommandBuilder) WithCacheKey(key string) *CommandBuilder
WithCacheKey sets a custom cache key
func (*CommandBuilder) WithCacheTTL ¶
func (cb *CommandBuilder) WithCacheTTL(ttl time.Duration) *CommandBuilder
WithCacheTTL sets the cache TTL
func (*CommandBuilder) WithContext ¶
func (cb *CommandBuilder) WithContext(context string) *CommandBuilder
WithContext sets the Kubernetes context
func (*CommandBuilder) WithDryRun ¶
func (cb *CommandBuilder) WithDryRun(dryRun bool) *CommandBuilder
WithDryRun enables dry run mode
func (*CommandBuilder) WithForce ¶
func (cb *CommandBuilder) WithForce(force bool) *CommandBuilder
WithForce enables force mode
func (*CommandBuilder) WithKubeconfig ¶
func (cb *CommandBuilder) WithKubeconfig(kubeconfig string) *CommandBuilder
WithKubeconfig sets the kubeconfig file
func (*CommandBuilder) WithLabel ¶
func (cb *CommandBuilder) WithLabel(key, value string) *CommandBuilder
WithLabel adds a label selector
func (*CommandBuilder) WithLabels ¶
func (cb *CommandBuilder) WithLabels(labels map[string]string) *CommandBuilder
WithLabels adds multiple label selectors
func (*CommandBuilder) WithNamespace ¶
func (cb *CommandBuilder) WithNamespace(namespace string) *CommandBuilder
WithNamespace sets the namespace
func (*CommandBuilder) WithOutput ¶
func (cb *CommandBuilder) WithOutput(output string) *CommandBuilder
WithOutput sets the output format
func (*CommandBuilder) WithTimeout ¶
func (cb *CommandBuilder) WithTimeout(timeout time.Duration) *CommandBuilder
WithTimeout sets the command timeout
func (*CommandBuilder) WithToken ¶ added in v0.0.15
func (cb *CommandBuilder) WithToken(token string) *CommandBuilder
WithToken sets the authentication token for kubectl commands
func (*CommandBuilder) WithValidation ¶
func (cb *CommandBuilder) WithValidation(validate bool) *CommandBuilder
WithValidation enables/disables validation
func (*CommandBuilder) WithWait ¶
func (cb *CommandBuilder) WithWait(wait bool) *CommandBuilder
WithWait enables wait mode
type DeleteOptions ¶
DeleteOptions represents options for delete commands
type HelmInstallOptions ¶
type HelmInstallOptions struct {
CreateNamespace bool
DryRun bool
Wait bool
ValuesFile string
SetValues map[string]string
}
HelmInstallOptions represents options for Helm install commands
type HelmListOptions ¶
HelmListOptions represents options for Helm list commands