execute

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execute

type Execute struct {
	// DryRun prevents making changes to the target cluster.
	DryRun bool

	// Environ are the environment variables on Tool invocation.
	Environ []string

	// Kubectl knows how to invoke 'kubectl'
	Kubectl Kubectler

	// Out is the stream to send steps to in a format that is 'kubectl apply -f -' consumable.
	// Setting Out prevents any other processing (like 'wait') to take place.
	Out io.Writer

	Log logr.Logger
}

Execute executes Action, Apply, Wait steps.

func (*Execute) Action

func (x *Execute) Action(id int, name string, doc []byte, portForward string, passedValues *yamlx.Values) error

Action performs an action on the target cluster.

func (*Execute) Apply

func (x *Execute) Apply(id int, name string, b []byte) error

Apply applies the resource in b to the target cluster.

func (*Execute) Wait

func (x *Execute) Wait(id int, flags string) error

Wait waits for target cluster conditions specified by flags to become true.

type Kubectl

type Kubectl struct {
	// Environ are the environment variables on kubectl invocation.
	Environ []string
	// Kubectl binary name and global arguments.
	KubeCtl, KubeConfig, KubeContext string

	Log logr.Logger
}

Kubectl can run kubectl cli.

func (Kubectl) Run

func (k Kubectl) Run(ctx context.Context, stdin string, args ...string) (string, string, error)

Run kubectl.

type Kubectler

type Kubectler interface {
	Run(ctx context.Context, stdin string, args ...string) (string, string, error)
}

Kubectler provides methods to invoke kubectl.

Jump to

Keyboard shortcuts

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