mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
feat(migration): adding support to migrate the PV to a new node (#304)
Usecase: A node in the Kubernetes cluster is replaced with a new node. The new node gets a different `kubernetes.io/hostname`. The storage devices that were attached to the old node are re-attached to the new node. Fix: Instead of using the default `kubenetes.io/hostname` as the node affinity label, this commit changes to use `openebs.io/nodeid`. The ZFS LocalPV driver will pick the value from the nodes and set the affinity. Once the old node is removed from the cluster, the K8s scheduler will continue to schedule applications on the old node only. User can now modify the value of `openebs.io/nodeid` on the new node to the same value that was available on the old node. This will make sure the pods/volumes are scheduled to the node now. Note: Now to migrate the PV to the other node, we have to move the disks to the other node and remove the old node from the cluster and set the same label on the new node using the same key, which will let k8s scheduler to schedule the pods to that node. Other updates: * adding faq doc * renaming the config variable to nodename Signed-off-by: Pawan <pawan@mayadata.io> Co-authored-by: Akhil Mohan <akhilerm@gmail.com> * Update docs/faq.md Co-authored-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
parent
da7f4c2320
commit
1b30116e5f
12 changed files with 104 additions and 34 deletions
|
|
@ -37,11 +37,10 @@ type Config struct {
|
|||
// - This will be a unix based socket
|
||||
Endpoint string
|
||||
|
||||
// NodeID helps in differentiating the nodes on
|
||||
// which node drivers are running. This is useful
|
||||
// in case of topologies and publishing or
|
||||
// unpublishing volumes on nodes
|
||||
NodeID string
|
||||
// Nodename helps in differentiating the nodes on
|
||||
// which node drivers are running. This is used
|
||||
// to set the topologies for the driver
|
||||
Nodename string
|
||||
}
|
||||
|
||||
// Default returns a new instance of config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue