kubectl

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package kubectl provides kubectl CLI wrapper.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeCtl

type KubeCtl struct {
	// contains filtered or unexported fields
}

KubeCtl wraps kubectl CLI with version selection and kubeconfig handling.

func NewKubeCtl

func NewKubeCtl(l logger.Logger) *KubeCtl

NewKubeCtl creates a new KubeCtl object with a given logger.

func (*KubeCtl) Apply

func (k *KubeCtl) Apply(ctx context.Context, res meta.Object) error

Apply executes `kubectl apply` with given resource.

func (*KubeCtl) Cleanup

func (k *KubeCtl) Cleanup()

Cleanup removes temporary files created by that object.

func (*KubeCtl) Delete

func (k *KubeCtl) Delete(ctx context.Context, res meta.Object) error

Delete executes `kubectl delete` with given resource.

func (*KubeCtl) Get

func (k *KubeCtl) Get(ctx context.Context, kind string, name string, res interface{}) error

Get executes `kubectl get` with given object kind and optional name, and decodes resource into `res`.

Jump to

Keyboard shortcuts

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