This repository has been archived by the owner on Jun 25, 2024. It is now read-only.
Cleaner: Use only CRDs with storage
= true
#1295
Labels
storage
= true
#1295
Description
Currently, to find the objects to remove, the cleaner iterates over all defined versions of a CRD.
For example:
v1alpha1
,v1beta1
,v1
etc.The cleaner then uses every CRD version to
list
the objects and then tries to remove them.That approach breaks if there is not a Conversion Webhook anymore, which is often the case during cleanup phase.
This is because the Kyma component, including the controller (operator), along with the defined Conversion Webhook may have been undeployed already (see: #1193).
To be able to
list
objects without the Conversion Webhook, the cleaner should only list objects from the CRD version marked withstorage
=true
.This requires that the same version, and only that version, is listed in the CRD's
status.storedVersions
field.NOTE
Proper migration of the CRD versions is beyond the scope of the cleaner.
As explained in the docs it is normal that more than one version is actually stored during API migration, as reflected in the CRD's
status.storedVersions
field.The cleaner, if invoked in a two-stored-versions scenario, will probably fail!
It is because there are still some CR instances stored using the old version, but the cleaner will try to access these using the new version, marked with
storage
=true
. And there's no Conversion Webhook available.Expected result
Cleaner doesn't try to
list
objects from an old CRD version.Actual result
Cleaner fails to
list
objects from an old CRD version, because there's no Conversion Webhook anymore.Steps to reproduce
TBD.
Troubleshooting
n/a
The text was updated successfully, but these errors were encountered: