kubectl

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kubectl

type Kubectl interface {
	// ShutDown downscales all statefulsets and deployments in the environment to 0 replicas
	ShutDown(env terra.Environment) error
	// DeletePVCs will delete all persistent volume claims in the environment
	DeletePVCs(env terra.Environment) error
	// DeleteNamespace will delete the environment's namespace
	DeleteNamespace(env terra.Environment) error
	// CreateNamespace will create the environment's namespace
	CreateNamespace(env terra.Environment) error
	// PortForward runs `kubectl port-forward` and returns the forwarding local port, a callback to stop forwarding, and
	// a possible error if the command failed.
	// The targetResource should be of the form `[pods|deployment|replicaset|service]/<name>`, like `service/sam-postgres-service`.
	PortForward(targetRelease terra.Release, targetResource string, targetPort int) (int, func() error, error)
}

Kubectl is a golang interface for executing `kubectl` commands

func NewKubectl

func NewKubectl(shellRunner shell.Runner, thelmaRoot root.Root, tokenSource oauth2.TokenSource, gkeClient *container.ClusterManagerClient) (Kubectl, error)

Jump to

Keyboard shortcuts

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