Documentation ¶
Index ¶
- type KubeClient
- func (k *KubeClient) CreatePVC(pvc corev1.PersistentVolumeClaim) error
- func (k *KubeClient) CreateStorageClass(scYAML string) error
- func (k *KubeClient) DeletePVC(pvc corev1.PersistentVolumeClaim) error
- func (k *KubeClient) DumpLogs(ns, podName, container string) error
- func (k *KubeClient) Exec(command, pod, container, ns string) (string, string, error)
- func (k *KubeClient) GetPVCPhase(pvc, ns string) (corev1.PersistentVolumeClaimPhase, error)
- func (k *KubeClient) GetPodList(ns, label string) (*corev1.PodList, error)
- func (k *KubeClient) WaitForDeployment(labelSelector, ns string) error
- func (k *KubeClient) WaitForDeploymentCleanup(labelSelector, ns string) error
- func (k *KubeClient) WaitForPod(podName, podNamespace string) error
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