Interview Prep/Helm/Helm 3 Architecture & Release Storage

What is `helm.sh/resource-policy: keep`?

IntermediateConceptHelm 3 Architecture & Release Storage
Answer

An annotation that tells Helm not to delete the resource during helm uninstall, or when it disappears from the chart during an upgrade. The object becomes orphaned and must be deleted by hand.

metadata:
  annotations:
    helm.sh/resource-policy: keep

We use it on PersistentVolumeClaims and on generated Secrets (database passwords) so an accidental uninstall does not destroy data. Remember that reinstalling will then hit "resource already exists" unless the ownership annotations still match.

All Helm questions Roadmap: Helm

More on Helm 3 Architecture & Release Storage