Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses the CRD lifecycle management issues described in stacklok/stacklok-epics#175 by moving CRDs from
crds/intotemplates/to take advantage of standard Helm upgrade capability.Problem: Helm does not upgrade CRDs during
helm upgradeoperations (#2518). CRDs placed in thecrds/directory are only processed during initial installation - subsequent upgrades silently leave CRDs unchanged, even when the chart contains updates. This led to users having stale CRDs without any indication (#2311).Solution: Following the common patterns, CRDs are now placed in
templates/instead ofcrds/. This ensures CRDs are upgraded alongside the chart duringhelm upgrade. We have additionally wrapped the CRDs with Helm template conditionals to provide flexibility:crds.install- Enable/disable CRD installation (for users who preferkubectl apply)crds.skip- List of specific CRDs to exclude from installationcrds.keep- Addshelm.sh/resource-policy: keepannotation to prevent CRD deletion on uninstallImplementation:
deploy/charts/operator-crds/crd-helm-wrapper/that wraps raw CRD YAML files with the desired Helm conditionals to allow for feature flagging crd installation, keeping, and skipping..tpltemplate files for maintainabilityRelated issues: #2518, #1779, #2311
Large PR Justification
The changes in this PR are all auto-generated CRD definitions.