Open
Description
Manager
- Watch MCM/MSA in GH namespace
- Create the MSA in the “To” hub
- Send to “To” hub cluster with the msa info(name), with klusterletaddonconfig if it exists in the annotation!
- Delete the MSA when deleting the MCM
- Watch MSA in To hub cluster namespace
- Wait until the sa secret for the MSA is ready -> BootstrapSecret ”bootstrap-”
- Generate the KlusterletConfig - ”migration-” which contain the above bootstrap-secret information
- Send to “From” hub cluster with info: bootstrap-secret, klusterletConfig, managed-clusters
- Send to “To” hub cluster with msa info again? with klusterletaddonconfig if it exists in the annotation!
Agent
-
“From” hub cluster - Receive the Event(bootstrap-secret,klusterletConfig, managed-clusters)
- Ensure the bootstrap-secret, KlusterletConfig
- Add annotation(agent.open-cluster-management.io/klusterlet-config) to managedcluster cr to let it ues the
- klusterletConfig: migration- Also add a mark to indicate the mcl is migrating
- Send the KlusterletAddonConfig of the migrating mcl to GH one by one -> can create the resource on the target cluster direclty?
- The manager received the KlusterletAddonConfig(it should have more than one), add it to the MCM annotation!
- Wait 10 seconds to ensure the klusterletconfig is applied -> ensure the hub propagate the klusterconfig into these managed clusters?
- Set all the hubAcceptClient of the mcl to false on the “From Hub” cluster -> trigger the klusterlet-agent to use the configured bootstrap server
- Wait 10 seconds again -> connect to the new hub
- Detach the managed clusters(hubAccpetClient -> false on the “From”
-
“To” hub cluster - Receive the to Event(with MSA info, KlusterletAddonConfig)
- AutoApprove the CSR created by SA(MSA) -> enable the registration feature: ManagedClusterAutoApproval and add the user to autoApproveUsers List
- Create the ClusterRole"multicluster-global-hub-migration:": Create subjectaccessreviews for the SA, only to check whether you have the permission to …?
- Binding to the SA with clusterRole: "multicluster-global-hub-migration:"
- Binding the ClusterRole "system:open-cluster-management:managedcluster:bootstrap:agent-registration" to the SA(MSA)
- Create the KlusterletAddonConfig
Metadata
Metadata
Assignees
Labels
No labels