Skip to content

Remove revision management in MachineDeployments #10479

@sbueringer

Description

@sbueringer

As of today MachineDeployments manage a history of MachineSet objects.

This feature roughly consists of:

  • Keeping a number of old MachineSets around (can be configured via MD.spec.revisionHistoryLimit)
  • Re-using old MachineSets if after a MachineDeployment update the Machine templates of MD and MS match again
  • Tracking revisions and revision history via annotations on MD and MS objects
  • corresponding clusterctl commands: clusterctl alpha rollout, see also: clusterctl rollout #3439
    • most notable the rollout undo command which allows to rollback to a previous revision of the MachineDeployment

This feature (afaik) has been mostly copied from k/k Deployments & ReplicaSets

Reasons why we should consider deprecation & removal:

  • As far as we are aware it is barely used by CAPI users and it leads to a lot of complexity in the MD controller (i.e. it makes it hard to introduce new features, like when we introduced the label/annotation in-place propagation). Indicators that it's barely used:
    • the corresponding clusterctl alpha rollout command is still alpha
    • we barely get any questions / requests about the entire feature
  • It's not usable with GitOps
  • It's highly recommended to have a history of YAMLs applied to a management cluster. With that it's easy to rollback. For clean operations that's already required for all objects apart from MachineDeployments (e.g. Cluster, KCP, InfraCluster, ...)
  • It's almost not usable without clusterctl (at least it's relatively complicated to use)
  • It's not usable with ClusterClass
  • In a lot of cases it's not safe to rollback (e.g. after Kubernetes upgrades)

So overall I think considering the current state of the feature, it's interoperability and that it's as far as we can tell not really used we should really consider if it's worth the complexity and otherwise consider deprecation.

If you are using the feature, please let us know.

Edited Nov 27th 2024: Deprecation was done in 1.8, now it is about removal

Metadata

Metadata

Assignees

Labels

kind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an APIkind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions