Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Index ¶
- Variables
- func AddByteArrayToManifest(bytes []byte, manifests []workapi.Manifest) []workapi.Manifest
- func AddManifests(objects []runtime.Object, manifests []workapi.Manifest) []workapi.Manifest
- func CheckInternalMemberClusterStatus(ctx context.Context, cluster framework.Cluster, ...)
- func CheckMemberClusterStatus(ctx context.Context, cluster framework.Cluster, ...)
- func CmpClusterRole(ctx context.Context, cluster framework.Cluster, ...)
- func CmpNamespace(ctx context.Context, cluster framework.Cluster, ...)
- func CmpRole(ctx context.Context, cluster framework.Cluster, ...)
- func CmpRoleBinding(ctx context.Context, cluster framework.Cluster, ...)
- func CmpSecret(ctx context.Context, cluster framework.Cluster, ...) *corev1.Secret
- func CreateResourcesForWebHookE2E(ctx context.Context, hubCluster *framework.Cluster, memberNamespace string)
- func CreateWork(ctx context.Context, hubCluster framework.Cluster, ...) workapi.Work
- func DeleteClusterResourcePlacement(ctx context.Context, cluster framework.Cluster, ...)
- func DeleteMemberCluster(ctx context.Context, cluster framework.Cluster, ...)
- func DeleteNamespace(ctx context.Context, cluster framework.Cluster, ns *corev1.Namespace)
- func DeleteResourcesForWebHookE2E(ctx context.Context, hubCluster *framework.Cluster, memberNamespace string)
- func DeleteWork(ctx context.Context, hubCluster framework.Cluster, work workapi.Work)
- func GenerateCRDObjectFromFile(cluster framework.Cluster, fs embed.FS, filepath string, ...) (runtime.Object, *schema.GroupVersionKind, schema.GroupVersionResource)
- func RandomWorkName(length int) string
- func UpdateWork(ctx context.Context, hubCluster *framework.Cluster, work *workapi.Work, ...) *workapi.Work
- func WaitCreateClusterResourcePlacementStatus(ctx context.Context, cluster framework.Cluster, ...)
- func WaitWork(ctx context.Context, cluster framework.Cluster, workName, workNamespace string)
Constants ¶
This section is empty.
Variables ¶
var ( // PollInterval defines the interval time for a poll operation. PollInterval = 250 * time.Millisecond // PollTimeout defines the time after which the poll operation times out. PollTimeout = 60 * time.Second )
Functions ¶
func AddByteArrayToManifest ¶ added in v0.6.1
AddByteArrayToManifest adds a given ByteArray to the manifest for Work Object.
func AddManifests ¶ added in v0.5.6
AddManifests adds manifests to be included within a Work.
func CheckInternalMemberClusterStatus ¶ added in v0.6.2
func CheckInternalMemberClusterStatus(ctx context.Context, cluster framework.Cluster, objectKey *types.NamespacedName, wantIMCStatus fleetv1alpha1.InternalMemberClusterStatus, imcStatusCmpOptions []cmp.Option)
CheckInternalMemberClusterStatus is used to check internal member cluster status.
func CheckMemberClusterStatus ¶ added in v0.6.2
func CheckMemberClusterStatus(ctx context.Context, cluster framework.Cluster, objectKey *types.NamespacedName, wantMCStatus fleetv1alpha1.MemberClusterStatus, mcStatusCmpOptions []cmp.Option)
CheckMemberClusterStatus is used to check member cluster status.
func CmpClusterRole ¶ added in v0.6.2
func CmpClusterRole(ctx context.Context, cluster framework.Cluster, objectKey *types.NamespacedName, wantClusterRole *rbacv1.ClusterRole, cmpOptions []cmp.Option)
CmpClusterRole compares actual cluster role with expected cluster role.
func CmpNamespace ¶ added in v0.6.2
func CmpNamespace(ctx context.Context, cluster framework.Cluster, objectKey *types.NamespacedName, wantNamespace *corev1.Namespace, cmpOptions []cmp.Option)
CmpNamespace compares actual namespace with expected namespace.
func CmpRole ¶ added in v0.6.2
func CmpRole(ctx context.Context, cluster framework.Cluster, objectKey *types.NamespacedName, wantRole *rbacv1.Role, cmpOptions []cmp.Option)
CmpRole compares actual role with expected role.
func CmpRoleBinding ¶ added in v0.6.2
func CmpRoleBinding(ctx context.Context, cluster framework.Cluster, objectKey *types.NamespacedName, wantRoleBinding *rbacv1.RoleBinding, cmpOptions []cmp.Option)
CmpRoleBinding compares actual role binding with expected role binding.
func CmpSecret ¶ added in v0.6.4
func CmpSecret(ctx context.Context, cluster framework.Cluster, objectKey *types.NamespacedName, wantSecret *corev1.Secret, cmpOptions []cmp.Option) *corev1.Secret
CmpSecret compares actual secret with expected secret and returns actual secret.
func CreateResourcesForWebHookE2E ¶ added in v0.6.5
func CreateResourcesForWebHookE2E(ctx context.Context, hubCluster *framework.Cluster, memberNamespace string)
CreateResourcesForWebHookE2E create resources required for Webhook E2E.
func CreateWork ¶ added in v0.5.6
func CreateWork(ctx context.Context, hubCluster framework.Cluster, workName, workNamespace string, manifests []workapi.Manifest) workapi.Work
CreateWork creates Work object based on manifest given.
func DeleteClusterResourcePlacement ¶
func DeleteClusterResourcePlacement(ctx context.Context, cluster framework.Cluster, crp *fleetv1alpha1.ClusterResourcePlacement)
DeleteClusterResourcePlacement is used delete ClusterResourcePlacement on the hub cluster.
func DeleteMemberCluster ¶
func DeleteMemberCluster(ctx context.Context, cluster framework.Cluster, mc *fleetv1alpha1.MemberCluster)
DeleteMemberCluster deletes MemberCluster in the hub cluster.
func DeleteNamespace ¶
DeleteNamespace delete namespace.
func DeleteResourcesForWebHookE2E ¶ added in v0.6.5
func DeleteResourcesForWebHookE2E(ctx context.Context, hubCluster *framework.Cluster, memberNamespace string)
DeleteResourcesForWebHookE2E deletes resources created for Webhook E2E.
func DeleteWork ¶ added in v0.5.6
DeleteWork deletes the given Work object and waits until work becomes not found.
func GenerateCRDObjectFromFile ¶ added in v0.6.1
func GenerateCRDObjectFromFile(cluster framework.Cluster, fs embed.FS, filepath string, genericCodec runtime.Decoder) (runtime.Object, *schema.GroupVersionKind, schema.GroupVersionResource)
GenerateCRDObjectFromFile provides the object and gvk from the manifest file given.
func RandomWorkName ¶ added in v0.5.6
RandomWorkName creates a work name in a correct format for e2e tests.
func UpdateWork ¶ added in v0.5.6
func UpdateWork(ctx context.Context, hubCluster *framework.Cluster, work *workapi.Work, objects []runtime.Object) *workapi.Work
UpdateWork updates an existing Work Object by replacing the Spec.Manifest with a new objects given from parameter.
func WaitCreateClusterResourcePlacementStatus ¶ added in v0.6.2
func WaitCreateClusterResourcePlacementStatus(ctx context.Context, cluster framework.Cluster, objectKey *types.NamespacedName, wantCRPStatus fleetv1alpha1.ClusterResourcePlacementStatus, crpStatusCmpOptions []cmp.Option, customTimeout time.Duration)
WaitCreateClusterResourcePlacementStatus waits for ClusterResourcePlacement to present on th hub cluster with a specific status.
Types ¶
This section is empty.