e2eutil

package
Version: v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicUpdateClusterCR

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

func CalculateRestoreWaitTime

func CalculateRestoreWaitTime(needDataClone bool) int

func CheckEtcdData

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

func ClusterCRWithTLS

func ClusterCRWithTLS(cl *api.EtcdCluster, memberPeerTLSSecret, memberServerTLSSecret, operatorClientTLSSecret string)

ClusterCRWithTLS adds TLSPolicy to the passing in cluster CR.

func ClusterWithVersion

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

func CreateCluster

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

func DeleteBackupFiles

func DeleteBackupFiles(wr writer.Writer, files []string) error

func DeleteCluster

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

func DeleteSecrets

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

func KillMembers

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

func LogfWithTimestamp

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

func NameLabelSelector

func NameLabelSelector(name string) map[string]string

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

func NewCluster

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

func NewEtcdRestore

func NewEtcdRestore(clusterName string, size int, restoreSource api.RestoreSource, backupStorageType api.BackupStorageType) *api.EtcdRestore

NewEtcdRestore returns an EtcdRestore CR with the specified RestoreSource

func NewS3Backup

func NewS3Backup(endpoints []string, clusterName, path, secret, clientTLSSecret string) *api.EtcdBackup

NewS3Backup creates a EtcdBackup object using clusterName.

func NewS3RestoreSource

func NewS3RestoreSource(path, awsSecret string) *api.S3RestoreSource

NewS3RestoreSource returns an S3RestoreSource with the specified path and secret

func PrepareClientTLSSecret

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

func PreparePeerTLSSecret

func PreparePeerTLSSecret(clusterName, ns, secretName string) error

func PrepareTLS

func PrepareTLS(clusterName, namespace, memberPeerTLSSecret, memberClientTLSSecret, operatorClientTLSSecret string) error

PrepareTLS creates all the required tls certs for a given clusterName.

func PutDataToEtcd

func PutDataToEtcd(url string) error

func UpdateCluster

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

func WaitPodsDeleted

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

func WaitPodsDeletedCompletely

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

func WaitPodsWithImageDeleted

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

func WaitSizeAndVersionReached

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

func WaitUntilMembersWithNamesDeleted

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

func WaitUntilNoBackupFiles

func WaitUntilNoBackupFiles(wr writer.Writer, path string, timeout int) error

func WaitUntilOperatorReady

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

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

func WaitUntilSizeReached

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

Types

type StorageCheckerOptions

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto