KB-12 Confirmed
Deleting a Release deletes its CRDs and Namespaces, also when the prune policy protects them
Behavior#
During a sync, the prune does not delete a CustomResourceDefinition or a Namespace unless
prune.includeCRDs or prune.includeNamespaces is true. When you delete a Release with
deletionPolicy.keepWorkloads: false, convoy deletes all objects in the ReleaseInventory. It
does not use the prune protection.
Effect#
- A deleted CRD deletes all custom resources of that type in the cluster, also resources that other Releases or other tools own.
- A deleted Namespace deletes all objects in that namespace.
Workaround#
Before you delete a Release that applied CRDs or Namespaces, set deletionPolicy.keepWorkloads: true.
Then delete the other objects yourself.
Fix direction#
Use the prune protection (includeCRDs, includeNamespaces) also when a Release is deleted.
In the code
convoy v0.9.0
internal/controller/release.(*Controller).pruneRefsinternal/controller/release/controller.go:666internal/controller/release.protectedFilterinternal/controller/release/controller.go:1918