vmware-tanzu / helm-charts

Contains Helm charts for Kubernetes related open source tools
https://vmware-tanzu.github.io/helm-charts/
Apache License 2.0
254 stars 363 forks source link

Add CRD keep annotation 'helm.sh/resource-policy' #587

Open nonamef opened 5 months ago

nonamef commented 5 months ago

Describe the problem/challenge you have If you delete the helm chart, all CRDs will be removed. Would like to keep the CRDs/CRs when deleting the chart.

Describe the solution you'd like Add an option to append the annotation 'helm.sh/resource-policy: keep' to all CRDs. e.g metadata: {{- if .Values.crds.keep }} annotations: helm.sh/resource-policy: keep {{- end }}

jenting commented 5 months ago

https://github.com/vmware-tanzu/helm-charts/blob/8930c4099fa76b14a4edacc01ecf0ee0e5536bdf/charts/velero/values.yaml#L308

The clean up CRD default is false.