e2eutil

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2017 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicUpdateClusterCR added in v0.5.0

func AtomicUpdateClusterCR(crClient client.EtcdClusterCR, name, namespace string, maxRetries int, updateFunc k8sutil.EtcdClusterCRUpdateFunc) (*api.EtcdCluster, error)

func CalculateRestoreWaitTime added in v0.3.0

func CalculateRestoreWaitTime(needDataClone bool) int

func CheckEtcdData added in v0.3.0

func CheckEtcdData(t *testing.T, url string)

func ClusterWithBackup added in v0.2.6

func ClusterWithBackup(cl *api.EtcdCluster, backupPolicy *api.BackupPolicy) *api.EtcdCluster

func ClusterWithRestore added in v0.2.6

func ClusterWithRestore(cl *api.EtcdCluster, restorePolicy *api.RestorePolicy) *api.EtcdCluster

func ClusterWithSelfHosted added in v0.2.6

func ClusterWithSelfHosted(cl *api.EtcdCluster, sh *api.SelfHostedPolicy) *api.EtcdCluster

func ClusterWithVersion added in v0.2.6

func ClusterWithVersion(cl *api.EtcdCluster, version string) *api.EtcdCluster

func CreateCluster added in v0.2.6

func CreateCluster(t *testing.T, crClient client.EtcdClusterCR, namespace string, cl *api.EtcdCluster) (*api.EtcdCluster, error)

func DeleteCluster added in v0.2.6

func DeleteCluster(t *testing.T, crClient client.EtcdClusterCR, kubeClient kubernetes.Interface, cl *api.EtcdCluster) error

func DeleteClusterAndBackup added in v0.3.0

func DeleteClusterAndBackup(t *testing.T, crClient client.EtcdClusterCR, kubecli kubernetes.Interface, cl *api.EtcdCluster, checkerOpt StorageCheckerOptions) error

func DeleteSecrets added in v0.4.1

func DeleteSecrets(kubecli kubernetes.Interface, namespace string, secretNames ...string) error

func KillMembers added in v0.3.0

func KillMembers(kubecli kubernetes.Interface, namespace string, names ...string) error

func LogfWithTimestamp added in v0.2.6

func LogfWithTimestamp(t *testing.T, format string, args ...interface{})

func MakeBackup added in v0.3.0

func MakeBackup(kubecli kubernetes.Interface, ns, clusterName string) error

func NameLabelSelector added in v0.5.0

func NameLabelSelector(name string) map[string]string

NameLabelSelector returns a label selector of the form name=<name>

func NewCluster added in v0.2.6

func NewCluster(genName string, size int) *api.EtcdCluster

func NewPVBackupPolicy added in v0.2.6

func NewPVBackupPolicy(cleanup bool, storageClass string) *api.BackupPolicy

func NewS3BackupPolicy added in v0.2.6

func NewS3BackupPolicy(cleanup bool) *api.BackupPolicy

func PrepareClientTLSSecret added in v0.3.1

func PrepareClientTLSSecret(dir, clusterName, ns, mSecret, oSecret string) error

func PreparePeerTLSSecret

func PreparePeerTLSSecret(clusterName, ns, secretName string) error

func PutDataToEtcd added in v0.3.0

func PutDataToEtcd(url string) error

func UpdateCluster added in v0.2.6

func UpdateCluster(crClient client.EtcdClusterCR, cl *api.EtcdCluster, maxRetries int, updateFunc k8sutil.EtcdClusterCRUpdateFunc) (*api.EtcdCluster, error)

func WaitBackupDeleted added in v0.3.1

func WaitBackupDeleted(kubeClient kubernetes.Interface, cl *api.EtcdCluster, checkerOpt StorageCheckerOptions) error

func WaitBackupPodUp added in v0.3.0

func WaitBackupPodUp(t *testing.T, kubecli kubernetes.Interface, ns, clusterName string, retries int) error

func WaitPodsDeleted added in v0.3.0

func WaitPodsDeleted(kubecli kubernetes.Interface, namespace string, retries int, lo metav1.ListOptions) ([]*v1.Pod, error)

func WaitPodsDeletedCompletely added in v0.4.1

func WaitPodsDeletedCompletely(kubecli kubernetes.Interface, namespace string, retries int, lo metav1.ListOptions) ([]*v1.Pod, error)

func WaitPodsWithImageDeleted added in v0.3.0

func WaitPodsWithImageDeleted(kubecli kubernetes.Interface, namespace, image string, retries int, lo metav1.ListOptions) ([]*v1.Pod, error)

func WaitSizeAndVersionReached added in v0.2.6

func WaitSizeAndVersionReached(t *testing.T, kubeClient kubernetes.Interface, version string, size, retries int, cl *api.EtcdCluster) error

func WaitUntilMembersWithNamesDeleted added in v0.3.3

func WaitUntilMembersWithNamesDeleted(t *testing.T, crClient client.EtcdClusterCR, retries int, cl *api.EtcdCluster, targetNames ...string) ([]string, error)

func WaitUntilOperatorReady added in v0.5.0

func WaitUntilOperatorReady(kubecli kubernetes.Interface, namespace, name string) error

WaitUntilOperatorReady will wait until the first pod selected for the label name=etcd-operator is ready.

func WaitUntilPodSizeReached added in v0.3.3

func WaitUntilPodSizeReached(t *testing.T, kubeClient kubernetes.Interface, size, retries int, cl *api.EtcdCluster) ([]string, error)

func WaitUntilSizeReached added in v0.2.6

func WaitUntilSizeReached(t *testing.T, crClient client.EtcdClusterCR, size, retries int, cl *api.EtcdCluster) ([]string, error)

Types

type StorageCheckerOptions added in v0.2.6

type StorageCheckerOptions struct {
	S3Cli          *s3.S3
	S3Bucket       string
	DeletedFromAPI bool
}

Jump to

Keyboard shortcuts

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