- Related issues: #2325 [FEATURE] Harvester control plane should spread across failure domains
Category:
- Host
Verification Steps
- Install first node, the role of this node should be Management Node
- Install second node, the role of this node should be Compute Node, the second node shouldn’t be promoted to Management Node
- Add label topology.kubernetes.io/zone=zone1 to the first node
- Install third node, the second node and third node shouldn’t be promoted
- Add label topology.kubernetes.io/zone=zone1 to the second node, the second node and third node shouldn’t be promoted
- Add label topology.kubernetes.io/zone=zone3 to the third node, the second node and third node shouldn’t be promoted
- Change the value of label topology.kubernetes.io/zone from zone1 to zone2 in the second node, the second node and third node will be promoted to Management Node one by one
Expected Results
Checked can pass the following test scenarios.
-
Install first node, the role of this node should be
Management Node
harv-0715-node1:~ # kubectl get nodes NAME STATUS ROLES AGE VERSION harv-0715-node1 Ready control-plane,etcd,master 8m19s v1.21.11+rke2r1
-
Install second node, the role of this node should be
Compute Node
, the second node shouldn’t be promoted toManagement Node
harv-0715-node1:~ # kubectl get nodes NAME STATUS ROLES AGE VERSION harv-0715-node1 Ready control-plane,etcd,master 30m v1.21.11+rke2r1 harv-0715-node2 Ready <none> 84s v1.21.11+rke2r1
-
Add label topology.kubernetes.io/zone=zone1 to the first node
-
Install third node, the second node and third node shouldn’t be promoted
harv-0715-node1:~ # kubectl get nodes NAME STATUS ROLES AGE VERSION harv-0715-node1 Ready control-plane,etcd,master 74m v1.21.11+rke2r1 harv-0715-node2 Ready <none> 45m v1.21.11+rke2r1 harv-0715-node3 Ready <none> 29m v1.21.11+rke2r1
-
Add label
topology.kubernetes.io/zone=zone1
to the second node, the second node and third node shouldn’t be promoted The second node have automatically addtopology.kubernetes.io/zone=zone1
after joining the cluster -
Add label
topology.kubernetes.io/zone=zone3
to the third node, the second node and third node shouldn’t be promotedNAME STATUS ROLES AGE VERSION harv-0715-node1 Ready control-plane,etcd,master 88m v1.21.11+rke2r1 harv-0715-node2 Ready <none> 59m v1.21.11+rke2r1 harv-0715-node3 Ready <none> 43m v1.21.11+rke2r1
-
Change the value of label
topology.kubernetes.io/zone
fromzone1
tozone2
in the second node, the second node and third node will be promoted to Management Node one by one -
Second node set to
zone2
-
Second node cordened and promoted
-
Third node cordened and promoted
-
All nodes are promoted to the
Mangement node
harv-0715-node1:~ # kubectl get nodes NAME STATUS ROLES AGE VERSION harv-0715-node1 Ready control-plane,etcd,master 93m v1.21.11+rke2r1 harv-0715-node2 Ready control-plane,etcd,master 64m v1.21.11+rke2r1 harv-0715-node3 Ready control-plane,etcd,master 48m v1.21.11+rke2r1