Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Index ¶
- Variables
- func CreateClusterResourcePlacement(cluster framework.Cluster, crp *v1alpha1.ClusterResourcePlacement)
- func CreateClusterRole(cluster framework.Cluster, cr *rbacv1.ClusterRole)
- func CreateMemberCluster(cluster framework.Cluster, mc *v1alpha1.MemberCluster)
- func CreateNamespace(cluster framework.Cluster, ns *corev1.Namespace)
- func CreateServiceAccount(cluster framework.Cluster, sa *corev1.ServiceAccount)
- func DeleteClusterResourcePlacement(cluster framework.Cluster, crp *v1alpha1.ClusterResourcePlacement)
- func DeleteClusterRole(cluster framework.Cluster, cr *rbacv1.ClusterRole)
- func DeleteMemberCluster(cluster framework.Cluster, mc *v1alpha1.MemberCluster)
- func DeleteNamespace(cluster framework.Cluster, ns *corev1.Namespace)
- func DeleteServiceAccount(cluster framework.Cluster, sa *corev1.ServiceAccount)
- func NewInternalMemberCluster(name, namespace string) *v1alpha1.InternalMemberCluster
- func NewMemberCluster(name string, heartbeat int32, state v1alpha1.ClusterState) *v1alpha1.MemberCluster
- func NewNamespace(name string) *corev1.Namespace
- func NewServiceAccount(name, namespace string) *corev1.ServiceAccount
- func UpdateMemberClusterState(cluster framework.Cluster, mc *v1alpha1.MemberCluster, ...)
- func WaitClusterRole(cluster framework.Cluster, cr *rbacv1.ClusterRole)
- func WaitConditionClusterResourcePlacement(cluster framework.Cluster, crp *v1alpha1.ClusterResourcePlacement, ...)
- func WaitConditionInternalMemberCluster(cluster framework.Cluster, imc *v1alpha1.InternalMemberCluster, ...)
- func WaitConditionMemberCluster(cluster framework.Cluster, mc *v1alpha1.MemberCluster, conditionName string, ...)
- func WaitInternalMemberCluster(cluster framework.Cluster, imc *v1alpha1.InternalMemberCluster)
- func WaitWork(cluster framework.Cluster, workName, workNamespace string)
Constants ¶
This section is empty.
Variables ¶
var ( // PollInterval defines the interval time for a poll operation. PollInterval = 5 * time.Second // PollTimeout defines the time after which the poll operation times out. PollTimeout = 60 * time.Second )
Functions ¶
func CreateClusterResourcePlacement ¶
func CreateClusterResourcePlacement(cluster framework.Cluster, crp *v1alpha1.ClusterResourcePlacement)
CreateClusterResourcePlacement created ClusterResourcePlacement and waits for ClusterResourcePlacement to exist in hub cluster.
func CreateClusterRole ¶
func CreateClusterRole(cluster framework.Cluster, cr *rbacv1.ClusterRole)
CreateClusterRole create cluster role in the hub cluster.
func CreateMemberCluster ¶
func CreateMemberCluster(cluster framework.Cluster, mc *v1alpha1.MemberCluster)
CreateMemberCluster creates MemberCluster and waits for MemberCluster to exist in the hub cluster.
func CreateNamespace ¶
CreateNamespace create namespace and waits for namespace to exist.
func CreateServiceAccount ¶
func CreateServiceAccount(cluster framework.Cluster, sa *corev1.ServiceAccount)
CreateServiceAccount create serviceaccount.
func DeleteClusterResourcePlacement ¶
func DeleteClusterResourcePlacement(cluster framework.Cluster, crp *v1alpha1.ClusterResourcePlacement)
DeleteClusterResourcePlacement is used delete ClusterResourcePlacement on the hub cluster.
func DeleteClusterRole ¶
func DeleteClusterRole(cluster framework.Cluster, cr *rbacv1.ClusterRole)
DeleteClusterRole deletes cluster role on cluster.
func DeleteMemberCluster ¶
func DeleteMemberCluster(cluster framework.Cluster, mc *v1alpha1.MemberCluster)
DeleteMemberCluster deletes MemberCluster in the hub cluster.
func DeleteNamespace ¶
DeleteNamespace delete namespace.
func DeleteServiceAccount ¶
func DeleteServiceAccount(cluster framework.Cluster, sa *corev1.ServiceAccount)
DeleteServiceAccount delete serviceaccount.
func NewInternalMemberCluster ¶
func NewInternalMemberCluster(name, namespace string) *v1alpha1.InternalMemberCluster
NewInternalMemberCluster returns a new internal member cluster.
func NewMemberCluster ¶
func NewMemberCluster(name string, heartbeat int32, state v1alpha1.ClusterState) *v1alpha1.MemberCluster
NewMemberCluster return a new member cluster.
func NewNamespace ¶
NewNamespace returns a new namespace.
func NewServiceAccount ¶
func NewServiceAccount(name, namespace string) *corev1.ServiceAccount
NewServiceAccount returns a new service account.
func UpdateMemberClusterState ¶
func UpdateMemberClusterState(cluster framework.Cluster, mc *v1alpha1.MemberCluster, state v1alpha1.ClusterState)
UpdateMemberClusterState updates MemberCluster in the hub cluster.
func WaitClusterRole ¶
func WaitClusterRole(cluster framework.Cluster, cr *rbacv1.ClusterRole)
WaitClusterRole waits for cluster roles to be created.
func WaitConditionClusterResourcePlacement ¶
func WaitConditionClusterResourcePlacement(cluster framework.Cluster, crp *v1alpha1.ClusterResourcePlacement, conditionName string, status metav1.ConditionStatus, customTimeout time.Duration)
WaitConditionClusterResourcePlacement waits for ClusterResourcePlacement to present on th hub cluster with a specific condition.
func WaitConditionInternalMemberCluster ¶
func WaitConditionInternalMemberCluster(cluster framework.Cluster, imc *v1alpha1.InternalMemberCluster, conditionType v1alpha1.AgentConditionType, status metav1.ConditionStatus, customTimeout time.Duration)
WaitConditionInternalMemberCluster waits for InternalMemberCluster to present on the hub cluster with a specific condition. Allowing custom timeout as for join cond it needs longer than defined PollTimeout for the member agent to finish joining.
func WaitConditionMemberCluster ¶
func WaitConditionMemberCluster(cluster framework.Cluster, mc *v1alpha1.MemberCluster, conditionName string, status metav1.ConditionStatus, customTimeout time.Duration)
WaitConditionMemberCluster waits for MemberCluster to present on th hub cluster with a specific condition.
func WaitInternalMemberCluster ¶
func WaitInternalMemberCluster(cluster framework.Cluster, imc *v1alpha1.InternalMemberCluster)
WaitInternalMemberCluster waits for InternalMemberCluster to present on th hub cluster.
Types ¶
This section is empty.