kubectl

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion(verbose bool) (string, error)

CheckVersion assures that the kubectl version used is compatible

func IsClusterResourceDeployed

func IsClusterResourceDeployed(resource string, labelName string, labelValue string, verbose bool) (bool, error)

IsClusterResourceDeployed checks if a kubernetes cluster resource is deployed. It will not wait till it is deployed. The resource gets identified by a lebel key=value pair.

func IsPodDeployed

func IsPodDeployed(namespace string, labelName string, labelValue string, verbose bool) (bool, error)

IsPodDeployed checks if a pod is deployed. It will not wait till it is deployed. The pod gets identified by the namespace and a label key=value pair.

func IsPodReady

func IsPodReady(namespace string, labelName string, labelValue string, verbose bool) (bool, error)

IsPodReady checks if a pod is deployed and running. It will not wait till it is deployed or running. The pod gets identified by the namespace and a lebel key=value pair.

func IsResourceDeployed

func IsResourceDeployed(resource string, namespace string, labelName string, labelValue string, verbose bool) (bool, error)

IsResourceDeployed checks if a kubernetes resource is deployed. It will not wait till it is deployed. The resource gets identified by the namespace and a lebel key=value pair.

func RunApplyCmd

func RunApplyCmd(resources []map[string]interface{}, verbose bool) (string, error)

RunApplyCmd executes a kubectl apply command with given resources

func RunCmd

func RunCmd(verbose bool, args ...string) (string, error)

RunCmd executes a kubectl command with given arguments

func RunCmdWithTimeout

func RunCmdWithTimeout(timeout time.Duration, verbose bool, args ...string) (string, error)

func WaitForPodGone

func WaitForPodGone(namespace string, labelName string, labelValue string, verbose bool) error

WaitForPodGone waits till a pod is not existent anymore. The pod gets identified by the namespace and a lebel key=value pair.

func WaitForPodReady

func WaitForPodReady(namespace string, labelName string, labelValue string, verbose bool) error

WaitForPodReady waits till a pod is deployed and has status 'running'. The pod gets identified by the namespace and a lebel key=value pair.

Types

type Wrapper

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

func NewWrapper

func NewWrapper(verbose bool) *Wrapper

func (*Wrapper) CheckVersion

func (w *Wrapper) CheckVersion() (string, error)

func (*Wrapper) IsClusterResourceDeployed

func (w *Wrapper) IsClusterResourceDeployed(resource string, labelName string, labelValue string) (bool, error)

func (*Wrapper) IsPodDeployed

func (w *Wrapper) IsPodDeployed(namespace string, labelName string, labelValue string) (bool, error)

func (*Wrapper) IsPodReady

func (w *Wrapper) IsPodReady(namespace string, labelName string, labelValue string) (bool, error)

func (*Wrapper) IsResourceDeployed

func (w *Wrapper) IsResourceDeployed(resource string, namespace string, labelName string, labelValue string) (bool, error)

func (*Wrapper) RunApplyCmd

func (w *Wrapper) RunApplyCmd(resources []map[string]interface{}) (string, error)

func (*Wrapper) RunCmd

func (w *Wrapper) RunCmd(args ...string) (string, error)

func (*Wrapper) WaitForPodGone

func (w *Wrapper) WaitForPodGone(namespace string, labelName string, labelValue string) error

func (*Wrapper) WaitForPodReady

func (w *Wrapper) WaitForPodReady(namespace string, labelName string, labelValue string) error

Jump to

Keyboard shortcuts

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