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 // Logs runs `kubectl logs` against the given Kubectx with given parameters Logs(ktx kubecfg.Kubectx, podSelector map[string]string, option ...LogsOption) 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
type LogsOption ¶
type LogsOption func(options *LogsOptions)
type LogsOptions ¶
type LogsOptions struct { // Writer optional callback that should return a writer where a given container's logs should be streamed // If nil, logs are streamed to stdout Writer io.Writer // ContainerName optional container name to specify with -c ContainerName string // MaxLines maximum number of log lines to retrieve MaxLines int }
Click to show internal directories.
Click to hide internal directories.