kubectl

package
Version: v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: AGPL-3.0 Imports: 14 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(ctx context.Context, kubeconfig string) (*KubeCtl, error)

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() error

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`.

func (*KubeCtl) Run added in v0.1.2

func (k *KubeCtl) Run(ctx context.Context, args []string, stdin interface{}) ([]byte, error)

Run wraps func run.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL