Documentation ¶
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)
- 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)
- 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 ¶
AddByteArrayToManifest adds a given ByteArray to the manifest for Work Object.
func AddManifests ¶
AddManifests adds manifests to be included within a Work.
func CheckInternalMemberClusterStatus ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
CreateResourcesForWebHookE2E create resources required for Webhook E2E.
func CreateWork ¶
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 ¶
DeleteResourcesForWebHookE2E deletes resources created for Webhook E2E.
func DeleteWork ¶
DeleteWork deletes the given Work object and waits until work becomes not found.
func GenerateCRDObjectFromFile ¶
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 ¶
RandomWorkName creates a work name in a correct format for e2e tests.
func UpdateWork ¶
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 ¶
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.