kubectl

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, log logr.Logger, options *Opt, stdin string, args ...string) (stdout string, stderr string, err error)

Run executes kubectl with 'stdin', 'args' and 'options' and returns stdout and stderr. Ctx is optional.

Types

type Opt

type Opt struct {
	// ExeOpt optionally set a working directory, environment.
	ExeOpt *exe.Opt
	// Kubectl optionally selects the executable to use.
	KubeCtl string
	// KubeConfig optionally sets the kubeconfig file to use.
	KubeConfig string
	// KubeContext optionally sets the context to use.
	KubeContext string
	// Perform a dry-run.
	DryRun bool
}

Opt are the command options.

Jump to

Keyboard shortcuts

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