cloudnative-pg / charts

CloudNativePG Helm Charts
Apache License 2.0
193 stars 94 forks source link

CRDs are not in the standard `crds/` directory #319

Open rorynickolls-skyral opened 5 months ago

rorynickolls-skyral commented 5 months ago

For Helm to detect CRDs correctly and install them in the correct order, they need to be placed in the chart-root/crds directory.

Running helm show crds . from the chart root shows that Helm does not currently detect them because they are in the chart-root/templates/crds directory.

This means that they are not installed according to the flow here: https://helm.sh/docs/topics/charts_hooks/#hooks-and-the-release-lifecycle which causes problems when used in a subchart that deploys resources using the CRDs.

Stevenpc3 commented 3 months ago

This is a good example https://github.com/jaegertracing/helm-charts/tree/main/charts/jaeger-operator

also allowing CRDs to be in another folder and OPTINALLY deployed would be nice as sometimes you don't want to deploy the CRD again, but you do want to upgrade or redeploy the operator.

heruan commented 1 week ago

I'm adding CNPG as a dependency to an umbrella chart. With CRDs installed as a template (and not in the root crds directory) if I install more than one release of that umbrella chart it complains that CRDs are already installed. Using Helm recommended method will detect if the CRDs are already installed, and skip the installation instead of failing.