Documentation
¶
Index ¶
- func CheckClusterManagerStatus(cm *operatorapiv1.ClusterManager) error
- func CheckDeploymentReady(ctx context.Context, kubeClient kubernetes.Interface, namespace, name string) error
- func CleanKlusterletRelatedResources(hub *Hub, spoke *Spoke, klusterletName, managedClusterName string)
- func CreateAndApproveKlusterlet(hub *Hub, spoke *Spoke, ...)
- type Hub
- func (hub *Hub) AcceptManageCluster(clusterName string) error
- func (hub *Hub) ApproveManagedClusterCSR(clusterName string) error
- func (hub *Hub) BuildClusterClient(saNamespace, saName string, ...) (clusterclient.Interface, error)
- func (hub *Hub) CheckHubReady() error
- func (hub *Hub) CheckManagedClusterAddOnStatus(managedClusterNamespace, addOnName string) error
- func (hub *Hub) CheckManagedClusterStatus(clusterName string) error
- func (hub *Hub) CheckManagedClusterStatusConditions(clusterName string, expectedConditions map[string]metav1.ConditionStatus) error
- func (hub *Hub) CleanManifestWorks(clusterName, workName string) error
- func (hub *Hub) CleanupClusterClient(saNamespace, saName string) error
- func (hub *Hub) CreateManagedClusterAddOn(managedClusterNamespace, addOnName, installNamespace string) error
- func (hub *Hub) CreateManagedClusterAddOnLease(addOnInstallNamespace, addOnName string) error
- func (hub *Hub) DeleteManageClusterAndRelatedNamespace(clusterName string) error
- func (hub *Hub) EnableAutoApprove(users []string) error
- func (hub *Hub) EnableHubWorkFeature(feature string) error
- func (hub *Hub) GetCluserManager() (*operatorapiv1.ClusterManager, error)
- func (hub *Hub) GetManagedCluster(clusterName string) (*clusterv1.ManagedCluster, error)
- func (hub *Hub) RemoveHubWorkFeature(feature string) error
- func (hub *Hub) SetHubAcceptsClient(clusterName string, hubAcceptClient bool) error
- func (hub *Hub) SetLeaseDurationSeconds(clusterName string, leaseDurationSeconds int32) error
- type Images
- type OCMClients
- type Spoke
- func (spoke *Spoke) CheckKlusterletStatus(klusterletName, condType, reason string, status metav1.ConditionStatus) error
- func (spoke *Spoke) CreateFakeExternalKubeconfigSecret(klusterlet *operatorapiv1.Klusterlet) error
- func (spoke *Spoke) CreateKlusterlet(name, clusterName, klusterletNamespace string, mode operatorapiv1.InstallMode, ...) (*operatorapiv1.Klusterlet, error)
- func (spoke *Spoke) CreatePureHostedKlusterlet(name, clusterName string) (*operatorapiv1.Klusterlet, error)
- func (spoke *Spoke) DeleteExternalKubeconfigSecret(klusterlet *operatorapiv1.Klusterlet) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckClusterManagerStatus ¶
func CheckClusterManagerStatus(cm *operatorapiv1.ClusterManager) error
func CheckDeploymentReady ¶
func CleanKlusterletRelatedResources ¶
func CleanKlusterletRelatedResources( hub *Hub, spoke *Spoke, klusterletName, managedClusterName string)
CleanKlusterletRelatedResources needs both hub side and spoke side operations
func CreateAndApproveKlusterlet ¶
func CreateAndApproveKlusterlet( hub *Hub, spoke *Spoke, klusterletName, managedClusterName, klusterletNamespace string, mode operatorapiv1.InstallMode, bootstrapHubKubeConfigSecret *corev1.Secret, images Images, )
CreateAndApproveKlusterlet requires operations on both hub side and spoke side
Types ¶
type Hub ¶
type Hub struct { *OCMClients ClusterManagerName string ClusterManagerNamespace string ClusterCfg *rest.Config }
Hub represents a hub cluster, it holds: * the clients to interact with the hub cluster * the metadata of the hub * the runtime data of the hub
func (*Hub) AcceptManageCluster ¶
func (*Hub) ApproveManagedClusterCSR ¶
func (*Hub) BuildClusterClient ¶
func (hub *Hub) BuildClusterClient(saNamespace, saName string, clusterPolicyRules, policyRules []rbacv1.PolicyRule) (clusterclient.Interface, error)
func (*Hub) CheckHubReady ¶
func (*Hub) CheckManagedClusterAddOnStatus ¶
func (*Hub) CheckManagedClusterStatus ¶
func (*Hub) CheckManagedClusterStatusConditions ¶
func (*Hub) CleanManifestWorks ¶
func (*Hub) CleanupClusterClient ¶
func (*Hub) CreateManagedClusterAddOn ¶
func (*Hub) CreateManagedClusterAddOnLease ¶
func (*Hub) DeleteManageClusterAndRelatedNamespace ¶
func (*Hub) EnableAutoApprove ¶
func (*Hub) EnableHubWorkFeature ¶
func (*Hub) GetCluserManager ¶
func (hub *Hub) GetCluserManager() (*operatorapiv1.ClusterManager, error)
func (*Hub) GetManagedCluster ¶
func (hub *Hub) GetManagedCluster(clusterName string) (*clusterv1.ManagedCluster, error)
func (*Hub) RemoveHubWorkFeature ¶
func (*Hub) SetHubAcceptsClient ¶
type OCMClients ¶
type OCMClients struct { KubeClient kubernetes.Interface APIExtensionsClient apiextensionsclient.Interface OperatorClient operatorclient.Interface ClusterClient clusterclient.Interface WorkClient workv1client.Interface AddonClient addonclient.Interface DynamicClient dynamic.Interface RestMapper meta.RESTMapper }
OCMClients contains every kind of client that we need to interact with ocm components
func NewOCMClients ¶
func NewOCMClients(clusterCfg *rest.Config) (*OCMClients, error)
type Spoke ¶
type Spoke struct { *OCMClients // Note: this is the namespace and name where the KlusterletOperator deployment is created, which // is different from the klusterlet namespace and name. KlusterletOperatorNamespace string KlusterletOperator string }
Spoke represents a spoke cluster, it holds: * the clients to interact with the spoke cluster * the metadata of the spoke * the runtime data of the spoke
func (*Spoke) CheckKlusterletStatus ¶
func (spoke *Spoke) CheckKlusterletStatus(klusterletName, condType, reason string, status metav1.ConditionStatus) error
func (*Spoke) CreateFakeExternalKubeconfigSecret ¶
func (spoke *Spoke) CreateFakeExternalKubeconfigSecret(klusterlet *operatorapiv1.Klusterlet) error
func (*Spoke) CreateKlusterlet ¶
func (spoke *Spoke) CreateKlusterlet( name, clusterName, klusterletNamespace string, mode operatorapiv1.InstallMode, bootstrapHubKubeConfigSecret *corev1.Secret, images Images) (*operatorapiv1.Klusterlet, error)
func (*Spoke) CreatePureHostedKlusterlet ¶
func (spoke *Spoke) CreatePureHostedKlusterlet(name, clusterName string) (*operatorapiv1.Klusterlet, error)
func (*Spoke) DeleteExternalKubeconfigSecret ¶
func (spoke *Spoke) DeleteExternalKubeconfigSecret(klusterlet *operatorapiv1.Klusterlet) error
Click to show internal directories.
Click to hide internal directories.