Documentation ¶
Index ¶
- func CreateLabelSelectorString(labels map[string]string) string
- func CreateListOptions(timeout *int64, labels map[string]string, resourceVersion string) *metav1.ListOptions
- type FakeKubeClient
- func (k *FakeKubeClient) CheckDeploymentExists(deploymentName string) (bool, error)
- func (k *FakeKubeClient) CheckPVCExists(pvc string) (bool, error)
- func (k *FakeKubeClient) CheckPodExists(pod string) (bool, error)
- func (k *FakeKubeClient) CheckSecretExists(secretName string) (bool, error)
- func (k *FakeKubeClient) CreateCHAPSecret(secretName, accountName, initiatorSecret, targetSecret string) (*v1.Secret, error)
- func (k *FakeKubeClient) CreateDeployment(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error)
- func (k *FakeKubeClient) CreatePV(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
- func (k *FakeKubeClient) CreatePVC(pvc *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
- func (k *FakeKubeClient) CreatePod(pod *v1.Pod) (*v1.Pod, error)
- func (k *FakeKubeClient) CreateSecret(secret *v1.Secret) (*v1.Secret, error)
- func (k *FakeKubeClient) DeletePV(pvName string, options *metav1.DeleteOptions) error
- func (k *FakeKubeClient) DeletePVC(pvcName string, options *metav1.DeleteOptions) error
- func (k *FakeKubeClient) DeletePod(podName string, options *metav1.DeleteOptions) error
- func (k *FakeKubeClient) DeleteSecret(secretName string, options *metav1.DeleteOptions) error
- func (k *FakeKubeClient) GetBoundPVC(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume, timeout *int64, ...) (*v1.PersistentVolumeClaim, error)
- func (k *FakeKubeClient) GetDeployment(deploymentName string, options metav1.GetOptions) (*v1beta1.Deployment, error)
- func (k *FakeKubeClient) GetPVC(pvcName string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error)
- func (k *FakeKubeClient) GetPVCPhase(pvcName string, options metav1.GetOptions) (v1.PersistentVolumeClaimPhase, error)
- func (k *FakeKubeClient) GetPod(podName string, options metav1.GetOptions) (*v1.Pod, error)
- func (k *FakeKubeClient) GetPodByLabels(listOptions *metav1.ListOptions) (*v1.Pod, error)
- func (k *FakeKubeClient) GetPodPhase(podName string, options metav1.GetOptions) (v1.PodPhase, error)
- func (k *FakeKubeClient) GetRunningPod(pod *v1.Pod, timeout *int64, labels map[string]string) (*v1.Pod, error)
- func (k *FakeKubeClient) GetSecret(secretName string, options metav1.GetOptions) (*v1.Secret, error)
- func (k *FakeKubeClient) ListPod(listOptions *metav1.ListOptions) (*v1.PodList, error)
- func (k *FakeKubeClient) Namespace() string
- func (k *FakeKubeClient) SnapshotState() *FakeKubeClientState
- func (k *FakeKubeClient) Version() *version.Info
- func (k *FakeKubeClient) WatchPVC(listOptions *metav1.ListOptions) (watch.Interface, error)
- func (k *FakeKubeClient) WatchPod(listOptions *metav1.ListOptions) (watch.Interface, error)
- type FakeKubeClientState
- type Interface
- type KubeClient
- func (k *KubeClient) CheckDeploymentExists(deploymentName string) (bool, error)
- func (k *KubeClient) CheckPVCExists(pvc string) (bool, error)
- func (k *KubeClient) CheckPodExists(pod string) (bool, error)
- func (k *KubeClient) CheckSecretExists(secretName string) (bool, error)
- func (k *KubeClient) CreateCHAPSecret(secretName, accountName, initiatorSecret, targetSecret string) (*v1.Secret, error)
- func (k *KubeClient) CreateDeployment(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error)
- func (k *KubeClient) CreatePV(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
- func (k *KubeClient) CreatePVC(pvc *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
- func (k *KubeClient) CreatePod(pod *v1.Pod) (*v1.Pod, error)
- func (k *KubeClient) CreateSecret(secret *v1.Secret) (*v1.Secret, error)
- func (k *KubeClient) DeletePV(pvName string, options *metav1.DeleteOptions) error
- func (k *KubeClient) DeletePVC(pvcName string, options *metav1.DeleteOptions) error
- func (k *KubeClient) DeletePod(podName string, options *metav1.DeleteOptions) error
- func (k *KubeClient) DeleteSecret(secretName string, options *metav1.DeleteOptions) error
- func (k *KubeClient) GetBoundPVC(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume, timeout *int64, ...) (*v1.PersistentVolumeClaim, error)
- func (k *KubeClient) GetDeployment(deploymentName string, options metav1.GetOptions) (*v1beta1.Deployment, error)
- func (k *KubeClient) GetPVC(pvcName string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error)
- func (k *KubeClient) GetPVCPhase(pvcName string, options metav1.GetOptions) (v1.PersistentVolumeClaimPhase, error)
- func (k *KubeClient) GetPod(podName string, options metav1.GetOptions) (*v1.Pod, error)
- func (k *KubeClient) GetPodByLabels(listOptions *metav1.ListOptions) (*v1.Pod, error)
- func (k *KubeClient) GetPodPhase(podName string, options metav1.GetOptions) (v1.PodPhase, error)
- func (k *KubeClient) GetRunningPod(pod *v1.Pod, timeout *int64, labels map[string]string) (*v1.Pod, error)
- func (k *KubeClient) GetSecret(secretName string, options metav1.GetOptions) (*v1.Secret, error)
- func (k *KubeClient) ListPod(listOptions *metav1.ListOptions) (*v1.PodList, error)
- func (k *KubeClient) Namespace() string
- func (k *KubeClient) Version() *version.Info
- func (k *KubeClient) WatchPVC(listOptions *metav1.ListOptions) (watch.Interface, error)
- func (k *KubeClient) WatchPod(listOptions *metav1.ListOptions) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateListOptions ¶
Types ¶
type FakeKubeClient ¶
type FakeKubeClient struct { Deployments map[string]*v1beta1.Deployment PVCs map[string]*v1.PersistentVolumeClaim // contains filtered or unexported fields }
func NewFakeKubeClient ¶
func NewFakeKubeClient(failMatrix map[string]bool, versionMajor, versionMinor string) *FakeKubeClient
func (*FakeKubeClient) CheckDeploymentExists ¶
func (k *FakeKubeClient) CheckDeploymentExists(deploymentName string) (bool, error)
func (*FakeKubeClient) CheckPVCExists ¶
func (k *FakeKubeClient) CheckPVCExists(pvc string) (bool, error)
func (*FakeKubeClient) CheckPodExists ¶
func (k *FakeKubeClient) CheckPodExists(pod string) (bool, error)
func (*FakeKubeClient) CheckSecretExists ¶
func (k *FakeKubeClient) CheckSecretExists(secretName string) (bool, error)
func (*FakeKubeClient) CreateCHAPSecret ¶
func (k *FakeKubeClient) CreateCHAPSecret(secretName, accountName, initiatorSecret, targetSecret string) (*v1.Secret, error)
func (*FakeKubeClient) CreateDeployment ¶
func (k *FakeKubeClient) CreateDeployment(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error)
func (*FakeKubeClient) CreatePV ¶
func (k *FakeKubeClient) CreatePV(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
func (*FakeKubeClient) CreatePVC ¶
func (k *FakeKubeClient) CreatePVC(pvc *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
func (*FakeKubeClient) CreateSecret ¶
func (*FakeKubeClient) DeletePV ¶
func (k *FakeKubeClient) DeletePV(pvName string, options *metav1.DeleteOptions) error
func (*FakeKubeClient) DeletePVC ¶
func (k *FakeKubeClient) DeletePVC(pvcName string, options *metav1.DeleteOptions) error
func (*FakeKubeClient) DeletePod ¶
func (k *FakeKubeClient) DeletePod(podName string, options *metav1.DeleteOptions) error
func (*FakeKubeClient) DeleteSecret ¶
func (k *FakeKubeClient) DeleteSecret(secretName string, options *metav1.DeleteOptions) error
func (*FakeKubeClient) GetBoundPVC ¶
func (k *FakeKubeClient) GetBoundPVC(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume, timeout *int64, labels map[string]string) (*v1.PersistentVolumeClaim, error)
func (*FakeKubeClient) GetDeployment ¶
func (k *FakeKubeClient) GetDeployment(deploymentName string, options metav1.GetOptions) (*v1beta1.Deployment, error)
func (*FakeKubeClient) GetPVC ¶
func (k *FakeKubeClient) GetPVC(pvcName string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error)
func (*FakeKubeClient) GetPVCPhase ¶
func (k *FakeKubeClient) GetPVCPhase(pvcName string, options metav1.GetOptions) (v1.PersistentVolumeClaimPhase, error)
func (*FakeKubeClient) GetPod ¶
func (k *FakeKubeClient) GetPod(podName string, options metav1.GetOptions) (*v1.Pod, error)
func (*FakeKubeClient) GetPodByLabels ¶
func (k *FakeKubeClient) GetPodByLabels(listOptions *metav1.ListOptions) (*v1.Pod, error)
func (*FakeKubeClient) GetPodPhase ¶
func (k *FakeKubeClient) GetPodPhase(podName string, options metav1.GetOptions) (v1.PodPhase, error)
func (*FakeKubeClient) GetRunningPod ¶
func (*FakeKubeClient) GetSecret ¶
func (k *FakeKubeClient) GetSecret(secretName string, options metav1.GetOptions) (*v1.Secret, error)
func (*FakeKubeClient) ListPod ¶
func (k *FakeKubeClient) ListPod(listOptions *metav1.ListOptions) (*v1.PodList, error)
func (*FakeKubeClient) Namespace ¶
func (k *FakeKubeClient) Namespace() string
func (*FakeKubeClient) SnapshotState ¶
func (k *FakeKubeClient) SnapshotState() *FakeKubeClientState
func (*FakeKubeClient) Version ¶
func (k *FakeKubeClient) Version() *version.Info
func (*FakeKubeClient) WatchPVC ¶
func (k *FakeKubeClient) WatchPVC(listOptions *metav1.ListOptions) (watch.Interface, error)
func (*FakeKubeClient) WatchPod ¶
func (k *FakeKubeClient) WatchPod(listOptions *metav1.ListOptions) (watch.Interface, error)
type FakeKubeClientState ¶
type Interface ¶
type Interface interface { Version() *version.Info GetDeployment(deploymentName string, options metav1.GetOptions) (*v1beta1.Deployment, error) CheckDeploymentExists(deploymentName string) (bool, error) CreateDeployment(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) GetPod(podName string, options metav1.GetOptions) (*v1.Pod, error) GetPodByLabels(listOptions *metav1.ListOptions) (*v1.Pod, error) GetPodPhase(podName string, options metav1.GetOptions) (v1.PodPhase, error) CheckPodExists(pod string) (bool, error) CreatePod(pod *v1.Pod) (*v1.Pod, error) DeletePod(podName string, options *metav1.DeleteOptions) error WatchPod(listOptions *metav1.ListOptions) (watch.Interface, error) ListPod(listOptions *metav1.ListOptions) (*v1.PodList, error) GetRunningPod(pod *v1.Pod, timeout *int64, labels map[string]string) (*v1.Pod, error) GetPVC(pvcName string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error) GetPVCPhase(pvcName string, options metav1.GetOptions) (v1.PersistentVolumeClaimPhase, error) CheckPVCExists(pvc string) (bool, error) CreatePVC(pvc *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) DeletePVC(pvcName string, options *metav1.DeleteOptions) error WatchPVC(listOptions *metav1.ListOptions) (watch.Interface, error) GetBoundPVC(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume, timeout *int64, labels map[string]string) (*v1.PersistentVolumeClaim, error) CreatePV(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) DeletePV(pvName string, options *metav1.DeleteOptions) error CreateSecret(secret *v1.Secret) (*v1.Secret, error) CreateCHAPSecret(secretName, accountName, initiatorSecret, targetSecret string) (*v1.Secret, error) GetSecret(secretName string, options metav1.GetOptions) (*v1.Secret, error) CheckSecretExists(secretName string) (bool, error) DeleteSecret(secretName string, options *metav1.DeleteOptions) error Namespace() string }
func NewFakeKubeClientBasic ¶
type KubeClient ¶
type KubeClient struct {
// contains filtered or unexported fields
}
func (*KubeClient) CheckDeploymentExists ¶
func (k *KubeClient) CheckDeploymentExists(deploymentName string) (bool, error)
func (*KubeClient) CheckPVCExists ¶
func (k *KubeClient) CheckPVCExists(pvc string) (bool, error)
func (*KubeClient) CheckPodExists ¶
func (k *KubeClient) CheckPodExists(pod string) (bool, error)
func (*KubeClient) CheckSecretExists ¶
func (k *KubeClient) CheckSecretExists(secretName string) (bool, error)
CheckSecretExists returns true if the Secret exists
func (*KubeClient) CreateCHAPSecret ¶
func (k *KubeClient) CreateCHAPSecret(secretName, accountName, initiatorSecret, targetSecret string) (*v1.Secret, error)
CreateCHAPSecret creates a new Secret for iSCSI CHAP mutual authentication
func (*KubeClient) CreateDeployment ¶
func (k *KubeClient) CreateDeployment(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error)
func (*KubeClient) CreatePV ¶
func (k *KubeClient) CreatePV(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
func (*KubeClient) CreatePVC ¶
func (k *KubeClient) CreatePVC(pvc *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
func (*KubeClient) CreateSecret ¶
CreateSecret creates a new Secret
func (*KubeClient) DeletePV ¶
func (k *KubeClient) DeletePV(pvName string, options *metav1.DeleteOptions) error
func (*KubeClient) DeletePVC ¶
func (k *KubeClient) DeletePVC(pvcName string, options *metav1.DeleteOptions) error
func (*KubeClient) DeletePod ¶
func (k *KubeClient) DeletePod(podName string, options *metav1.DeleteOptions) error
func (*KubeClient) DeleteSecret ¶
func (k *KubeClient) DeleteSecret(secretName string, options *metav1.DeleteOptions) error
DeleteSecret deletes the specified Secret
func (*KubeClient) GetBoundPVC ¶
func (k *KubeClient) GetBoundPVC(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume, timeout *int64, labels map[string]string) (*v1.PersistentVolumeClaim, error)
func (*KubeClient) GetDeployment ¶
func (k *KubeClient) GetDeployment( deploymentName string, options metav1.GetOptions) (*v1beta1.Deployment, error)
func (*KubeClient) GetPVC ¶
func (k *KubeClient) GetPVC(pvcName string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error)
func (*KubeClient) GetPVCPhase ¶
func (k *KubeClient) GetPVCPhase(pvcName string, options metav1.GetOptions) (v1.PersistentVolumeClaimPhase, error)
func (*KubeClient) GetPod ¶
func (k *KubeClient) GetPod(podName string, options metav1.GetOptions) (*v1.Pod, error)
func (*KubeClient) GetPodByLabels ¶
func (k *KubeClient) GetPodByLabels(listOptions *metav1.ListOptions) (*v1.Pod, error)
func (*KubeClient) GetPodPhase ¶
func (k *KubeClient) GetPodPhase(podName string, options metav1.GetOptions) (v1.PodPhase, error)
func (*KubeClient) GetRunningPod ¶
func (*KubeClient) GetSecret ¶
func (k *KubeClient) GetSecret(secretName string, options metav1.GetOptions) (*v1.Secret, error)
GetSecret looks up a Secret by name
func (*KubeClient) ListPod ¶
func (k *KubeClient) ListPod(listOptions *metav1.ListOptions) (*v1.PodList, error)
func (*KubeClient) Namespace ¶
func (k *KubeClient) Namespace() string
func (*KubeClient) Version ¶
func (k *KubeClient) Version() *version.Info
func (*KubeClient) WatchPVC ¶
func (k *KubeClient) WatchPVC(listOptions *metav1.ListOptions) (watch.Interface, error)
func (*KubeClient) WatchPod ¶
func (k *KubeClient) WatchPod(listOptions *metav1.ListOptions) (watch.Interface, error)
Click to show internal directories.
Click to hide internal directories.