Skip to content

feat: package CRDs as separate helm chart with ArgoCD examples#36

Merged
Breee merged 4 commits into
mainfrom
copilot/package-crds-as-extra-helmchart
May 29, 2026
Merged

feat: package CRDs as separate helm chart with ArgoCD examples#36
Breee merged 4 commits into
mainfrom
copilot/package-crds-as-extra-helmchart

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

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 via controller-gen). Chart templates are generated and published entirely in CI via make sync-crds — no manual steps required.

Changes

  • Makefile — Added sync-crds target that copies generated CRDs from config/crd/bases/ into both chart template directories with conditional wrappers; integrated into codegen
  • .github/workflows/ci.ymlhelm-lint job runs make sync-crds to generate CRD templates before linting both charts; E2E job uses sync-crds for CRD installation
  • .github/workflows/release.yml — Release job generates and publishes both drop and drop-crds charts to GHCR
  • .gitignore — Generated CRD chart templates excluded from version control
  • charts/drop-crds/ — Standalone helm chart packaging all 4 CRDs as templates, upgradeable via normal helm upgrade
  • charts/drop/values.yaml — Added crds.install (default true); set to false when managing CRDs separately
  • charts/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 manifests
  • docs/content/docs/install.md — CRD management section covering separate chart, ArgoCD, and Renovate patterns

Usage

# Install CRDs independently (upgradeable)
helm install drop-crds oci://ghcr.io/breee/charts/drop-crds

# Install operator without bundled CRDs
helm install drop oci://ghcr.io/breee/charts/drop \
  --namespace drop-system --create-namespace \
  --set crds.install=false

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:

  • CI: make sync-crds generates CRD templates, then lints and templates both charts
  • Release: make sync-crds generates templates, then packages and pushes both drop and drop-crds to oci://ghcr.io/breee/charts/

No manual make sync-crds is required — it's a convenience for local development only.

Copilot AI linked an issue May 29, 2026 that may be closed by this pull request
…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 AI changed the title [WIP] Add CRDs as extra helmchart with installation options feat: package CRDs as separate helm chart with ArgoCD examples May 29, 2026
Copilot finished work on behalf of Breee May 29, 2026 20:10
Copilot AI requested a review from Breee May 29, 2026 20:10
@Breee
Copy link
Copy Markdown
Member

Breee commented May 29, 2026

@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.
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 29, 2026

@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.

Agreed — refactored so config/crd/bases/ remains the single source of truth (generated from Go structs via controller-gen). The chart templates are now produced by make sync-crds, which copies them with the conditional wrappers. The codegen target includes sync-crds so the charts stay in sync automatically. No manual duplication.

Copilot finished work on behalf of Breee May 29, 2026 20:17
@Breee
Copy link
Copy Markdown
Member

Breee commented May 29, 2026

@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)
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 29, 2026

@copilot all of that should happen in CI. I will never ever publish a crd chart manually

Done. CI now handles everything:

  • helm-lint job runs make sync-crds to generate CRD templates before validation
  • Release workflow generates and publishes both drop and drop-crds charts
  • Generated CRD templates are in .gitignore — nothing to commit manually

See commit ci: generate and publish drop-crds chart entirely in CI.

Copilot finished work on behalf of Breee May 29, 2026 20:21
@Breee Breee marked this pull request as ready for review May 29, 2026 20:24
@Breee Breee merged commit e6b3cec into main May 29, 2026
5 of 6 checks passed
@Breee Breee deleted the copilot/package-crds-as-extra-helmchart branch May 29, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package crds as extra helmchart

2 participants