Skip to content

feat: handle CRD lifecycle in helm backend chart#591

Open
alokkumardalei-wq wants to merge 1 commit into
kbind-dev:mainfrom
alokkumardalei-wq:feature/crd-lifecycle-404
Open

feat: handle CRD lifecycle in helm backend chart#591
alokkumardalei-wq wants to merge 1 commit into
kbind-dev:mainfrom
alokkumardalei-wq:feature/crd-lifecycle-404

Conversation

@alokkumardalei-wq

@alokkumardalei-wq alokkumardalei-wq commented Jul 14, 2026

Copy link
Copy Markdown

Description

Fixes #404.

Currently, CRDs are placed in the crds/ folder of the backend chart, meaning they are only applied on helm install and ignored during helm upgrade. This PR shifts CRDs to the templates/ folder to enable a proper lifecycle and allow users to upgrade CRDs seamlessly alongside backend updates.

Changes:

  • Moved generated CRDs from crds/ to templates/crds/.
  • Wrapped CRDs with a {{- if .Values.crds.install }} Helm conditional.
  • Set crds.install: true as the default in values.yaml.
  • Updated hack/update-codegen.sh to automatically wrap generated CRD outputs with these conditionals for future development.

Warning

Because CRDs are now managed as standard templates, running helm uninstall on this chart will delete the CRDs and subsequently delete all instances of those Custom Resources in the cluster.

Testing & Verification:

  • Generated new CRDs via hack/update-codegen.sh and verified the correct output paths and template bindings.
  • Ran make helm-build-local successfully to ensure the chart parses and packages without syntax errors.

Fixes kbind-dev#404 by moving CRDs to templates and guarding with crds.install flag.

Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
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.

feature: CRD lifecycle

1 participant