docker-registry.helm icon indicating copy to clipboard operation
docker-registry.helm copied to clipboard

Keep images volume by default

Open edwargix opened this issue 3 years ago • 1 comments

This commit sets the helm.sh/resource-policy annotation 0 of the PersistentVolumeClaim to "keep" if the persistence.keep value is true (the default).

This makes it so the persistent volume claim is not destroyed when the chart is uninstalled. This saves people from accidentally destroying their entire volume of images whenever they, for example, want to move the chart to a different namespace (which requires uninstalling and reinstalling the chart in the new namespace because the namespace field is immutable).

Several other big-name charts use a "keep" resource policy for similar reasons (see 1 and 2).

If the user still wants their PVC to be destroyed, then can either set persistence.keep to false or manually delete it after an uninstall. The helm CLI alerts the user when objects are left around after the chart is uninstalled.

edwargix avatar Aug 28 '22 18:08 edwargix

cc @canterberry

edwargix avatar Sep 02 '22 21:09 edwargix