kudo icon indicating copy to clipboard operation
kudo copied to clipboard

Prevent deletion of certain resources when uninstalling an instance

Open bearpaws opened this issue 4 years ago • 0 comments

What would you like to be added:

For certain resources created by an operator during instance installation, provide a way to optionally retain those resources when the instance is uninstalled.

During re-installation of an instance with the same name, KUDO should detect that the resource already exists and not overwrite it.

This could, for example, be controlled via an annotation on the resource:

kind: Secret
metadata:
  annotations:
    "kudo.dev/deletion-policy": "retain"

Why is this needed:

For example, an operator may install a database and generate a random Secret that contains the credentials for the database. The database is persisted on a PVC. When the instance is uninstalled, KUDO will not delete the PVC but will delete the Secret. If attempting to reuse the retained PVC, the credentials are lost.

bearpaws avatar Apr 15 '21 16:04 bearpaws