DopplerHQ / kubernetes-operator

Apache License 2.0
44 stars 18 forks source link

Manage CRDs via Helm #53

Open zoispag opened 9 months ago

zoispag commented 9 months ago

Request

Consider supporting managing for CRDs via Helm.

Reasoning

We manage our charts, including doppler-kubernetes-operator using ArgoCD. And we use Renovatebot to keep dependencies up to date.

The renovatebot PR looks like this:

image

and seeing there is a new property in the DopplerSecret, made me think that I might have to update my CRDs. But this might not always be the case, and I do not want to do this manually.

How to achieve

Helm cannot upgrade custom resource definitions in the <chart>/crds folder by design.

However, by moving the CRDs inside the <chart>/templates directory, it is possible to keep them in-sync, together with the rest of the templates when there's a new version.

See for example how ArgoCD project is doing the same: https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd#custom-resource-definitions

nmanoogian commented 9 months ago

Thanks for reaching out about this, @zoispag! We've hit several issues with Helm's recommendations for CRD management. It's good to know that other established projects are choosing to include their CRDs in the main /templates directory rather than using /crds.

I'll share this with the product team and see if we can dig in 👍