Skip to content

Commit 9a4f70a

Browse files
committed
do not use Helm 3's crds/ folder that uses crd pre-install hook
As detailed in [1], CRDs that are applied through the CRD pre-install hook will not ever be updated or upgraded. The Helm documentation reads [4]: > The resources that a hook creates are not tracked or managed as part of > the release. Once Tiller verifies that the hook has reached its ready > state, it will leave the hook resource alone. > > Practically speaking, this means that if you create resources in a hook, > you cannot rely upon helm delete to remove the resources. To destroy such > resources, you need to either write code to perform this operation in a > pre-delete or post-delete hook or add "helm.sh/hook-delete-policy" > annotation to the hook template file. On top of that, it seems to be not possible (after multiple trials) to manage CRDs using Helm 3's crd-install hook using the crds/ folder [2]. It seems like the only way would be to bundle crds inside the templates/ like cert-manager has been doing for a while. Note that installing CRDs using the templates/ way also causes trouble. Rob Percival mentions in [1] that Helm has a problem with the CRD ordering [3] and that the issue has not been fixed yet, which means installing operators like google-cas-issuer breaks when the CRDs are inside templates/. [1]: GoogleCloudPlatform/marketplace-k8s-app-tools#303 [2]: https://helm.sh/docs/developing_charts/#defining-a-crd-with-the-crd-install-hook [3]: helm/helm#2994 [4]: https://v2.helm.sh/docs/developing_charts/#hook-resources-are-not-managed-with-corresponding-releases Signed-off-by: Maël Valais <[email protected]>
1 parent 5ca712d commit 9a4f70a

File tree

5 files changed

+249
-241
lines changed

5 files changed

+249
-241
lines changed

chart/jetstacksecure-mp/charts/google-cas-issuer/crds/crds.cas-issuer.jetstack.io_googlecasclusterissuers.yaml

Lines changed: 0 additions & 121 deletions
This file was deleted.

chart/jetstacksecure-mp/charts/google-cas-issuer/crds/crds.cas-issuer.jetstack.io_googlecasissuers.yaml

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)