clusterctl: Make move sequence inside the single group ordered and predictable #12082
Labels
area/clusterctl
Issues or PRs related to clusterctl
kind/feature
Categorizes issue or PR as related to a new feature.
needs-priority
Indicates an issue lacks a `priority/foo` label and requires one.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
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:
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
cluster-api/cmd/clusterctl/client/cluster/mover.go
Line 509 in 59130fa
The move weight (order based on logic described above) function can be added to the node struct here
cluster-api/cmd/clusterctl/client/cluster/objectgraph.go
Line 58 in 59130fa
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
The text was updated successfully, but these errors were encountered: