-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
Add an optional mode/flag to scaffold a separate chart for CRDs (as a subchart or sibling chart). This is intended for advanced use cases and to align with Helm best practices around CRD installation and chart ordering.
References:
- Helm best practices: separate charts for CRDs is a documented approach: https://helm.sh/docs/chart_best_practices/custom_resource_definitions/
- Kubebuilder Helm plugin rationale for placing CRDs in templates today: https://book.kubebuilder.io/plugins/available/helm-v2-alpha.html
- User-facing confusion / install failures in: Question: helm - CRDs for first installation #5386
Motivation
Today the Helm plugin places CRDs under templates/crd so Helm applies them like normal resources and upgrades them (Helm’s crds/ directory installs once and does not manage upgrades). This is intentional.
However, there are common operational needs where users want:
- CRDs installed ahead of everything else (and potentially by cluster admins)
- a clean separation between “cluster-scoped API installation” (CRDs) and “namespaced operator installation”
- the ability to install CRs after CRDs are registered (without relying on hooks)
Helm docs explicitly describe the “separate charts” approach for CRDs/resources ordering.
Proposed feature
Introduce an optional flag/mode for the Helm plugin, for example:
kubebuilder edit --plugins=helm/v2-alpha --crd-chart
Expected output (one possible layout)
subchart dependency
dist/chart/charts/<project>-crds/(CRDs only, installed separately or as dependency)- (document recommended install ordering)
Metadata
Metadata
Assignees
Labels
No labels