feat: package CRDs as separate helm chart with ArgoCD examples#36
Conversation
…novate config - Add charts/drop-crds/ helm chart for standalone CRD installation - Add crds.install toggle to main chart (default: true) to disable CRDs when using the separate chart - Add examples/argocd/ with Application manifests for CRDs and operator - Update renovate.json with custom managers for ArgoCD chart versions - Update installation docs with CRD management, ArgoCD, and Renovate guidance
|
@copilot not convinced yet. We obviously only want the crds to be in one place and either copy or reference them. They are generated anyway from the structs usually. |
CRD content lives only in config/crd/bases/ (generated from Go structs). Chart templates are produced by `make sync-crds` which copies them with conditional wrappers. The codegen target now includes sync-crds.
Agreed — refactored so |
|
@copilot all of that should happen in CI. I will never ever publish a crd chart manually |
- CI helm-lint job runs `make sync-crds` to generate CRD templates before linting - Release workflow publishes both drop and drop-crds charts from generated sources - E2E uses sync-crds instead of just manifests - Generated CRD templates added to .gitignore (no longer committed)
Done. CI now handles everything:
See commit |
Helm doesn't update CRDs on
helm upgrade, making CRD lifecycle management unreliable. This adds a standalone CRDs chart, a toggle to disable CRDs in the main chart, ArgoCD examples, and Renovate config for automated version tracking.CRDs are maintained as a single source of truth in
config/crd/bases/(generated from Go structs viacontroller-gen). Chart templates are generated and published entirely in CI viamake sync-crds— no manual steps required.Changes
Makefile— Addedsync-crdstarget that copies generated CRDs fromconfig/crd/bases/into both chart template directories with conditional wrappers; integrated intocodegen.github/workflows/ci.yml—helm-lintjob runsmake sync-crdsto generate CRD templates before linting both charts; E2E job usessync-crdsfor CRD installation.github/workflows/release.yml— Release job generates and publishes bothdropanddrop-crdscharts to GHCR.gitignore— Generated CRD chart templates excluded from version controlcharts/drop-crds/— Standalone helm chart packaging all 4 CRDs as templates, upgradeable via normalhelm upgradecharts/drop/values.yaml— Addedcrds.install(defaulttrue); set tofalsewhen managing CRDs separatelycharts/drop/templates/crds-*.yaml— CRDs rendered conditionally on.Values.crds.install(generated in CI, not committed)examples/argocd/— Two Application manifests: CRDs (sync-wave -1, ServerSideApply+Replace) and operator (crds disabled)renovate.json— Custom regex managers to auto-bump chart versions in ArgoCD manifestsdocs/content/docs/install.md— CRD management section covering separate chart, ArgoCD, and Renovate patternsUsage
For ArgoCD, deploy as two Applications with the CRDs app at a lower sync-wave — see
examples/argocd/.CI/CD
Both charts are generated and published automatically:
make sync-crdsgenerates CRD templates, then lints and templates both chartsmake sync-crdsgenerates templates, then packages and pushes bothdropanddrop-crdstooci://ghcr.io/breee/charts/No manual
make sync-crdsis required — it's a convenience for local development only.