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.
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.