argo-helm
argo-helm copied to clipboard
add-crds-in-to-argocd-templates-with-condition-enabled-true-false
Is your feature request related to a problem?
Hello,
When I'm trying to deploy Argocd with terraform, I can't add the option --install-crd on terraform code (helm_release resource) So it will be good if we can enable CRD installation on values.yaml like on argo-events.
Thanks
Related helm chart
argo-cd
Describe the solution you'd like
Like argo-events move crds directory on argocd/templates/
Add this condition on CRD files:
{{- if .Values.crds.install }}
#code
{{- end }}
On values.yaml:
## Custom resource configuration
crds:
# -- Install and upgrade CRDs
install: true
Describe alternatives you've considered
No response
Additional context
No response
what if helm uninstall is done mistakenly or due to some unavoidable condition? helm will remove all crds which would also remove all "Application"s in the cluster. and if I reinstall the chart immediately, I cannot get back all Applications without recreating all the Applications which would also mean deleting pods and recreating.
I think crds should be either in top level crds/ folder or should be a separate chart as recommended by helm itself -> https://helm.sh/docs/chart_best_practices/custom_resource_definitions/
There is similar solution in argo-events or argo-rollouts that allows to keep CRDs after uninstall. The real problem are configuration options additionalProjects
or additionalApplications
that would fail the installation if used in this way.
FYI, I am planning to follow the steps below. 🙋 https://github.com/argoproj/argo-helm/pull/1342#pullrequestreview-1019481838
Actually, you can choose to install CRD's or not-install CRD's using terraform. https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release#skip_crds