kubectl

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MIT Imports: 11 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 struct {
	// contains filtered or unexported fields
}

func NewKubectl

func NewKubectl(version, binDir, kubeConfigFilePath string) *Kubectl

func (*Kubectl) ApplyAllManifest

func (k *Kubectl) ApplyAllManifest(ctx context.Context, manifests []string, wait bool) error

func (*Kubectl) ApplyFile

func (k *Kubectl) ApplyFile(ctx context.Context, filePath string) error

func (*Kubectl) ApplyFileAndWait

func (k *Kubectl) ApplyFileAndWait(ctx context.Context, filepath string) error

func (*Kubectl) ApplyKustomize

func (k *Kubectl) ApplyKustomize(ctx context.Context, kustomizePath string) error

func (*Kubectl) Capture

func (k *Kubectl) Capture(ctx context.Context, args []string) (stdout string, stderr string, err error)

Capture execute command with returning outs as string.

func (*Kubectl) DeleteAllManifest

func (k *Kubectl) DeleteAllManifest(ctx context.Context, manifests []string, wait bool) error

func (*Kubectl) DeleteFile

func (k *Kubectl) DeleteFile(ctx context.Context, filePath string) error

func (*Kubectl) DeleteFileAndWait

func (k *Kubectl) DeleteFileAndWait(ctx context.Context, filePath string) error

func (*Kubectl) DeleteKustomize

func (k *Kubectl) DeleteKustomize(ctx context.Context, kustomizePath string) error

func (*Kubectl) DeleteResource

func (k *Kubectl) DeleteResource(ctx context.Context, name, namespace, resource string) error

func (*Kubectl) Dir

func (k *Kubectl) Dir() string

func (*Kubectl) Envs

func (k *Kubectl) Envs() []string

func (*Kubectl) Execute

func (k *Kubectl) Execute(ctx context.Context, args []string) error

Execute If OutPut is necessary, use Capture. Execute uses os.Stderr.

func (*Kubectl) GetNamespacesList

func (k *Kubectl) GetNamespacesList(ctx context.Context) ([]string, error)

func (*Kubectl) GetResourceNameList

func (k *Kubectl) GetResourceNameList(ctx context.Context, namespace, resource string) ([]string, error)

func (*Kubectl) GetResourceStatusList

func (k *Kubectl) GetResourceStatusList(ctx context.Context, namespacedName types.NamespacedName, resource string) (bool, error)

func (*Kubectl) Name

func (k *Kubectl) Name() string

func (*Kubectl) Path

func (k *Kubectl) Path() string

func (*Kubectl) URL added in v1.1.0

func (k *Kubectl) URL() string

func (*Kubectl) UseContext

func (k *Kubectl) UseContext(ctx context.Context, clusterName string) error

func (*Kubectl) Version

func (k *Kubectl) Version() string

func (*Kubectl) WaitAResource

func (k *Kubectl) WaitAResource(ctx context.Context, resource string, namespacedName types.NamespacedName) (ready bool, err error)

WaitAResource waits until deploy is ready.

func (*Kubectl) WaitFileForReady

func (k *Kubectl) WaitFileForReady(ctx context.Context, filePath string) error

Jump to

Keyboard shortcuts

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