-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide CRDs in a subchart #1732
Comments
I can open a PR with proposed changes if that's ok. |
Can't you install crds using kustomize from argocd? See:
|
I should have been be more clear in the description. Apologies for that:
Having CRDs in a subchart comes with an extra feature: it's possible to template them. One interesting case is adding optional annotations. For Argo CD users, the following is pretty standard I'd say: ...
metadata:
annotations:
argocd.argoproj.sync-options: Delete=false,Replace=true,ServerSideApply=true
... Is there something I might be missing here? I mean to not follow the suggested approach to CRDs installation. |
I see. I'm not against the subchart as long as the content is generated and is integrated with the current workflow, contribution is of course absolutely welcome! |
Please make it completely optional |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! |
@cmontemuino are you still planning to implement this? |
Is your feature request related to a problem? Please describe.
Helm 3 does not manage CRDs (see https://helm.sh/docs/chart_best_practices/custom_resource_definitions/).
helm uninstall
won't remove CRDs, andhelm updgrade
won't upgrade them. Manual intervention is required with the current setup. It is not GitOps friendly at all.crds
folder are not included into the helm release.Additionally, it is not possible to template CRDs in Helm 3 in the
crds
folder.The following comes from helm best practices around CRDs:
https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#method-1-let-helm-do-it-for-you
Describe the solution you'd like
Put the CRDs into a subchart.
Describe alternatives you've considered
Our current approach is publishing a chart in our private registry with the CRDs alone. Then, we install the CRDs first, and logging-operator chart later.
This is done with Argo CD, having two applications (one per each chart).
Additional context
A (debatable) better approach here would be to publish CRDs in a separate chart. This is exactly what Prometheus is doing: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-operator-crds
Prometheus is following https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#method-2-separate-charts:
I do think having CRDs in a subchart might be convenient enough. Indeed, this approach is also available in the prometheus-stack chart: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/charts/crds
The text was updated successfully, but these errors were encountered: