framework

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MinimumCluster represents the minimum number of member clusters to run E2E test.
	MinimumCluster = 2
)

Variables

This section is empty.

Functions

func ClusterNames

func ClusterNames() []string

ClusterNames will return all member clusters' names we have.

func Clusters

func Clusters() []*clusterv1alpha1.Cluster

Clusters will return all member clusters we have.

func CreateCRD

CreateCRD create CustomResourceDefinition with dynamic client.

func CreateClusterPropagationPolicy

func CreateClusterPropagationPolicy(client karmada.Interface, policy *policyv1alpha1.ClusterPropagationPolicy)

CreateClusterPropagationPolicy create ClusterPropagationPolicy with karmada client.

func CreateDeployment

func CreateDeployment(client kubernetes.Interface, deployment *appsv1.Deployment)

CreateDeployment create Deployment.

func CreateJob

func CreateJob(client kubernetes.Interface, job *batchv1.Job)

CreateJob create Job.

func CreateNamespace added in v1.0.0

func CreateNamespace(client kubernetes.Interface, namespace *corev1.Namespace)

CreateNamespace create Namespace.

func CreateOverridePolicy added in v1.0.0

func CreateOverridePolicy(client karmada.Interface, policy *policyv1alpha1.OverridePolicy)

CreateOverridePolicy create OverridePolicy with karmada client.

func CreatePod added in v1.0.0

func CreatePod(client kubernetes.Interface, pod *corev1.Pod)

CreatePod create Pod.

func CreatePropagationPolicy

func CreatePropagationPolicy(client karmada.Interface, policy *policyv1alpha1.PropagationPolicy)

CreatePropagationPolicy create PropagationPolicy with karmada client.

func CreateService added in v1.0.0

func CreateService(client kubernetes.Interface, service *corev1.Service)

CreateService create Service.

func CreateWorkload added in v1.0.0

func CreateWorkload(client dynamic.Interface, workload *workloadv1alpha1.Workload)

CreateWorkload create Workload with dynamic client

func ExtractTargetClustersFrom added in v1.0.0

func ExtractTargetClustersFrom(c client.Client, deployment *appsv1.Deployment) []string

ExtractTargetClustersFrom extract the target cluster names from deployment's related resourceBinding Information.

func GetCRD

func GetCRD(client dynamic.Interface, name string)

GetCRD get CustomResourceDefinition with dynamic client.

func GetClusterClient

func GetClusterClient(clusterName string) kubernetes.Interface

GetClusterClient get cluster client

func GetClusterDynamicClient

func GetClusterDynamicClient(clusterName string) dynamic.Interface

GetClusterDynamicClient get cluster dynamicClient

func GetClusterNamesFromClusters

func GetClusterNamesFromClusters(clusters []*clusterv1alpha1.Cluster) []string

GetClusterNamesFromClusters will get Clusters' names form Clusters Object.

func GetJob

func GetJob(client kubernetes.Interface, namespace, name string)

GetJob get Job.

func GetWorkload added in v1.0.0

func GetWorkload(client dynamic.Interface, namespace, name string) *workloadv1alpha1.Workload

GetWorkload get Workload with dynamic client.

func InitClusterInformation

func InitClusterInformation(karmadaClient karmada.Interface, controlPlaneClient client.Client)

InitClusterInformation init the E2E test's cluster information.

func RemoveCRD

func RemoveCRD(client dynamic.Interface, name string)

RemoveCRD delete CustomResourceDefinition with dynamic client.

func RemoveClusterPropagationPolicy

func RemoveClusterPropagationPolicy(client karmada.Interface, name string)

RemoveClusterPropagationPolicy delete ClusterPropagationPolicy with karmada client.

func RemoveDeployment

func RemoveDeployment(client kubernetes.Interface, namespace, name string)

RemoveDeployment delete Deployment.

func RemoveJob

func RemoveJob(client kubernetes.Interface, namespace, name string)

RemoveJob delete Job.

func RemoveNamespace added in v1.0.0

func RemoveNamespace(client kubernetes.Interface, name string)

RemoveNamespace delete Namespace.

func RemoveOverridePolicy added in v1.0.0

func RemoveOverridePolicy(client karmada.Interface, namespace, name string)

RemoveOverridePolicy delete OverridePolicy with karmada client.

func RemovePod added in v1.0.0

func RemovePod(client kubernetes.Interface, namespace, name string)

RemovePod delete Pod.

func RemovePropagationPolicy

func RemovePropagationPolicy(client karmada.Interface, namespace, name string)

RemovePropagationPolicy delete PropagationPolicy with karmada client.

func RemoveService added in v1.0.0

func RemoveService(client kubernetes.Interface, namespace, name string)

RemoveService delete Service.

func RemoveWorkload added in v1.0.0

func RemoveWorkload(client dynamic.Interface, namespace, name string)

RemoveWorkload delete Workload with dynamic client.

func UpdateDeploymentAnnotations added in v1.0.0

func UpdateDeploymentAnnotations(client kubernetes.Interface, deployment *appsv1.Deployment, annotations map[string]string)

UpdateDeploymentAnnotations update deployment's annotations.

func UpdateDeploymentReplicas

func UpdateDeploymentReplicas(client kubernetes.Interface, deployment *appsv1.Deployment, replicas int32)

UpdateDeploymentReplicas update deployment's replicas.

func UpdateJobWithPatchBytes added in v1.0.0

func UpdateJobWithPatchBytes(client kubernetes.Interface, namespace, name string, patchBytes []byte, patchType types.PatchType)

UpdateJobWithPatchBytes update job with patch bytes.

func UpdatePodWithPatch added in v1.0.0

func UpdatePodWithPatch(client kubernetes.Interface, namespace, name string, patch []map[string]interface{}, patchType types.PatchType)

UpdatePodWithPatch update pod with patch bytes.

func UpdateServiceWithPatch added in v1.0.0

func UpdateServiceWithPatch(client kubernetes.Interface, namespace, name string, patch []map[string]interface{}, patchType types.PatchType)

UpdateServiceWithPatch update service with patch bytes.

func UpdateWorkload added in v1.0.0

func UpdateWorkload(client dynamic.Interface, workload *workloadv1alpha1.Workload, clusterName string, subresources ...string)

UpdateWorkload update Workload with dynamic client

func WaitCRDDisappearedOnClusters

func WaitCRDDisappearedOnClusters(clusters []string, crdName string)

WaitCRDDisappearedOnClusters wait CustomResourceDefinition disappear on clusters until timeout.

func WaitCRDPresentOnClusters

func WaitCRDPresentOnClusters(client karmada.Interface, clusters []string, crdAPIVersion, crdKind string)

WaitCRDPresentOnClusters wait CustomResourceDefinition present on clusters until timeout.

func WaitClusterFitWith added in v1.0.0

func WaitClusterFitWith(c client.Client, clusterName string, fit func(cluster *clusterv1alpha1.Cluster) bool)

WaitClusterFitWith wait cluster fit with fit func.

func WaitDeploymentDisappearOnCluster added in v1.0.0

func WaitDeploymentDisappearOnCluster(cluster, namespace, name string)

WaitDeploymentDisappearOnCluster wait deployment disappear on cluster until timeout.

func WaitDeploymentDisappearOnClusters

func WaitDeploymentDisappearOnClusters(clusters []string, namespace, name string)

WaitDeploymentDisappearOnClusters wait deployment disappear on member clusters until timeout.

func WaitDeploymentPresentOnClusterFitWith

func WaitDeploymentPresentOnClusterFitWith(cluster, namespace, name string, fit func(deployment *appsv1.Deployment) bool)

WaitDeploymentPresentOnClusterFitWith wait deployment present on member clusters sync with fit func.

func WaitDeploymentPresentOnClustersFitWith added in v1.0.0

func WaitDeploymentPresentOnClustersFitWith(clusters []string, namespace, name string, fit func(deployment *appsv1.Deployment) bool)

WaitDeploymentPresentOnClustersFitWith wait deployment present on cluster sync with fit func.

func WaitJobDisappearOnCluster added in v1.0.0

func WaitJobDisappearOnCluster(cluster, namespace, name string)

WaitJobDisappearOnCluster wait job disappear on cluster until timeout.

func WaitJobDisappearOnClusters added in v1.0.0

func WaitJobDisappearOnClusters(clusters []string, namespace, name string)

WaitJobDisappearOnClusters wait job disappear on member clusters until timeout.

func WaitJobPresentOnClusterFitWith added in v1.0.0

func WaitJobPresentOnClusterFitWith(cluster, namespace, name string, fit func(job *batchv1.Job) bool)

WaitJobPresentOnClusterFitWith wait job present on member clusters sync with fit func.

func WaitJobPresentOnClustersFitWith added in v1.0.0

func WaitJobPresentOnClustersFitWith(clusters []string, namespace, name string, fit func(job *batchv1.Job) bool)

WaitJobPresentOnClustersFitWith wait job present on cluster sync with fit func.

func WaitNamespaceDisappearOnCluster added in v1.0.0

func WaitNamespaceDisappearOnCluster(cluster, name string)

WaitNamespaceDisappearOnCluster wait namespace disappear on cluster until timeout.

func WaitNamespaceDisappearOnClusters added in v1.0.0

func WaitNamespaceDisappearOnClusters(clusters []string, name string)

WaitNamespaceDisappearOnClusters wait namespace disappear on clusters until timeout.

func WaitNamespacePresentOnCluster added in v1.0.0

func WaitNamespacePresentOnCluster(cluster, name string)

WaitNamespacePresentOnCluster wait namespace present on cluster until timeout.

func WaitNamespacePresentOnClusters added in v1.0.0

func WaitNamespacePresentOnClusters(clusters []string, name string)

WaitNamespacePresentOnClusters wait namespace present on clusters until timeout.

func WaitPodDisappearOnCluster added in v1.0.0

func WaitPodDisappearOnCluster(cluster, namespace, name string)

WaitPodDisappearOnCluster wait pod disappear on cluster until timeout.

func WaitPodDisappearOnClusters added in v1.0.0

func WaitPodDisappearOnClusters(clusters []string, namespace, name string)

WaitPodDisappearOnClusters wait pod disappear on member clusters until timeout.

func WaitPodPresentOnClusterFitWith added in v1.0.0

func WaitPodPresentOnClusterFitWith(cluster, namespace, name string, fit func(pod *corev1.Pod) bool)

WaitPodPresentOnClusterFitWith wait pod present on member clusters sync with fit func.

func WaitPodPresentOnClustersFitWith added in v1.0.0

func WaitPodPresentOnClustersFitWith(clusters []string, namespace, name string, fit func(pod *corev1.Pod) bool)

WaitPodPresentOnClustersFitWith wait pod present on cluster sync with fit func.

func WaitServiceDisappearOnCluster added in v1.0.0

func WaitServiceDisappearOnCluster(cluster, namespace, name string)

WaitServiceDisappearOnCluster wait service disappear on cluster until timeout.

func WaitServiceDisappearOnClusters added in v1.0.0

func WaitServiceDisappearOnClusters(clusters []string, namespace, name string)

WaitServiceDisappearOnClusters wait service disappear on member clusters until timeout.

func WaitServicePresentOnClusterFitWith added in v1.0.0

func WaitServicePresentOnClusterFitWith(cluster, namespace, name string, fit func(service *corev1.Service) bool)

WaitServicePresentOnClusterFitWith wait service present on member clusters sync with fit func.

func WaitServicePresentOnClustersFitWith added in v1.0.0

func WaitServicePresentOnClustersFitWith(clusters []string, namespace, name string, fit func(service *corev1.Service) bool)

WaitServicePresentOnClustersFitWith wait service present on cluster sync with fit func.

func WaitWorkloadDisappearOnCluster added in v1.0.0

func WaitWorkloadDisappearOnCluster(cluster, namespace, name string)

WaitWorkloadDisappearOnCluster wait workload disappear on cluster until timeout.

func WaitWorkloadDisappearOnClusters added in v1.0.0

func WaitWorkloadDisappearOnClusters(clusters []string, namespace, name string)

WaitWorkloadDisappearOnClusters wait workload disappear on member clusters until timeout.

func WaitWorkloadPresentOnClusterFitWith added in v1.0.0

func WaitWorkloadPresentOnClusterFitWith(cluster, namespace, name string, fit func(workload *workloadv1alpha1.Workload) bool)

WaitWorkloadPresentOnClusterFitWith wait workload present on member clusters sync with fit func.

Types

This section is empty.

Jump to

Keyboard shortcuts

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