k8s

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeClient

type KubeClient struct {
	kubernetes.Interface
}

KubeClient interface for k8s API

var Client *KubeClient

Client for KubeClient

func (*KubeClient) CreatePVC

func (k *KubeClient) CreatePVC(pvc corev1.PersistentVolumeClaim) error

CreatePVC creates the PVC from given yaml

func (*KubeClient) CreateStorageClass

func (k *KubeClient) CreateStorageClass(scYAML string) error

CreateStorageClass creates storageClass from given yaml

func (*KubeClient) DeletePVC

func (k *KubeClient) DeletePVC(pvc corev1.PersistentVolumeClaim) error

DeletePVC creates the PVC from given yaml

func (*KubeClient) DumpLogs

func (k *KubeClient) DumpLogs(ns, podName, container string) error

DumpLogs will dump log for given ns/pod

func (*KubeClient) Exec

func (k *KubeClient) Exec(command, pod, container, ns string) (string, string, error)

Exec execute the given command in given ns/pod/container and return the output

func (*KubeClient) GetPVCPhase

func (k *KubeClient) GetPVCPhase(pvc, ns string) (corev1.PersistentVolumeClaimPhase, error)

GetPVCPhase return given PVC's phase

func (*KubeClient) GetPodList

func (k *KubeClient) GetPodList(ns, label string) (*corev1.PodList, error)

GetPodList return list of pod for given label and namespace

func (*KubeClient) WaitForDeployment

func (k *KubeClient) WaitForDeployment(labelSelector, ns string) error

WaitForDeployment wait for deployment having given labelSelector and namespace to be ready

func (*KubeClient) WaitForDeploymentCleanup

func (k *KubeClient) WaitForDeploymentCleanup(labelSelector, ns string) error

WaitForDeploymentCleanup wait for cleanup of deployment having given labelSelector and namespace

func (*KubeClient) WaitForPod

func (k *KubeClient) WaitForPod(podName, podNamespace string) error

WaitForPod wait for given pod to become ready

Jump to

Keyboard shortcuts

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