rancher / elemental-operator

The Elemental operator is responsible for managing the OS versions and maintaining a machine inventory to assist with edge or baremetal installations.
Apache License 2.0
40 stars 17 forks source link

Implement toggle to automatically clean up no-longer-in-sync ManagedOSVersions #759

Closed anmazzotti closed 2 months ago

anmazzotti commented 2 months ago

As a follow up to https://github.com/rancher/elemental-operator/pull/750, we should add an option to the ManagedOSVersionChannel spec so that no-longer-in-sync versions are automatically deleted.

As part of this issue, or to be split in a pre-requisite issue, is to determine when ManagedOSVersions can be safely deleted. What happens if they are referenced in a ManagedOSImage? Is there some race condition in which deleting the version is going to corrupt the ManagedOSImage? Can we prevent this and how?

With a finalizer maybe on ManagedOSVersions. This entire logic should be reviewed, the relation bewteen ManagedOSVersions and ManagedOSImages should be more clear.

anmazzotti commented 2 months ago

All is merged and backported to 1.6.x so closing this issue. The UI part is in its own issue already: https://github.com/rancher/elemental-ui/issues/189