Description
What would you like to be added (User Story)?
As a developer, I would like to have a predictable and ordered of moving objects during a move operation on one level (group). For example, a sequence that would perfectly suit most conditions:
- All Objects from the corev1 GV or Secrets and ConfigMaps only
- Cluster API Cluster and ClusterClass
- All other objects sorted by GVK and name (or not ordered). It does not matter in this case
Currently, moving objects in one group (level) is sporadic, so changes will not break the current behavior.
The reasons for such changes are that there may be native Cluster API extension objects that cannot be bound to the Cluster object or cannot enter into relationships with it using physical links, but the sequence of the move operation is important because of these objects can receive pause or any other information from the Cluster object being moved before.
Detailed Description
To implement this feature, the final move sequence can be changed at the end of this function
The move weight (order based on logic described above) function can be added to the node struct here
At the final of the getMoveSequence
function we should iterate over the move groups and sort nodes inside each group based logic described above.
Anything else you would like to add?
I will take care about this issue if it will be accepted
Label(s) to be applied
/kind feature
/area clusterctl