-
Notifications
You must be signed in to change notification settings - Fork 192
K8SPSMDB-1470: Add CRD sub-chart to enable CRD upgrades #753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bogdanjeler-ev
merged 17 commits into
release-psmdb-1.22.0
from
K8SPSMDB-1470-for-release-1.22.0
Jan 14, 2026
Merged
K8SPSMDB-1470: Add CRD sub-chart to enable CRD upgrades #753
bogdanjeler-ev
merged 17 commits into
release-psmdb-1.22.0
from
K8SPSMDB-1470-for-release-1.22.0
Jan 14, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jvpasinatto
requested changes
Jan 6, 2026
charts/psmdb-operator-crds/templates/perconaservermongodbbackups.psmdb.percona.com.yaml
Outdated
Show resolved
Hide resolved
eleo007
approved these changes
Jan 7, 2026
- Create psmdb-operator-crds sub-chart with individual CRD templates - Add CRD sub-chart as optional dependency in psmdb-operator Chart.yaml - Add crds.enabled configuration option (default: false for backward compatibility) - Update README with CRD upgrade instructions - Move crds section to end of values.yaml for better organization - Follows Everest pattern for consistency across Percona charts This allows users to: - Upgrade CRDs via helm upgrade (previously not possible) - Install CRDs separately for better lifecycle management - Use with GitOps tools (ArgoCD, FluxCD) that support server-side apply Resolves: K8SPSMDB-1470
- Add 'Important Limitation' section explaining CRD ownership metadata issue - Add troubleshooting section with exact error messages and solutions - Add warning in operator README about enabling crds.enabled=true with existing CRDs - Provide clear guidance on when and how to take ownership of existing CRDs This helps users understand why enabling crds.enabled=true fails when CRDs were previously installed via the crds/ directory and provides solutions.
…tibility - Update psmdb-db chart to version 1.22.0 - Update psmdb-operator chart to version 1.22.0 - Update psmdb-operator-crds chart to version 1.22.0 - Update all version references in README files - Update default image tags in values.yaml files
- Merge revisionHistoryLimit parameter from target branch - Keep maxConcurrentReconciles parameter from feature branch - Remove duplicate podAnnotations entry - Use consistent formatting from target branch
3eca6a7 to
f105268
Compare
jvpasinatto
requested changes
Jan 12, 2026
…add validation - Sync charts/psmdb-operator/crds/crd.yaml with CRD templates - Remove 'Recommended for Production' language from READMEs (first release) - Add GitHub Action to validate CRD sync on PRs - Add note about default behavior discussion in values.yaml - Ensure CRD files stay in sync for future releases
Only run validation on pull requests, not on pushes to main branch.
- Validate that psmdb-operator-crds chart version matches operator appVersion - Validate that CRD chart appVersion matches operator appVersion - Validate that dependency version matches CRD chart version - Add clear notes that this rule applies ONLY to psmdb-operator-crds - Other charts (e.g., psmdb-db) can have independent chart versions
The original crd.yaml file concatenates CRDs directly without '---' separators
or newlines between them (format: 'status: {}apiVersion: ...').
- Remove '---' separators when combining templates
- Remove trailing newline from each CRD file before concatenating
- Handle Windows line endings properly
- Update sync instructions to match the correct format
The original crd.yaml file has no trailing newline at the end. Remove trailing newlines from both files before comparison to ensure they match exactly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR adds a new
psmdb-operator-crdssub-chart that allows CRDs to be managed and upgraded via Helm.Problem
Helm's built-in CRD handling (via the
crds/directory) only installs CRDs on initialhelm installand never upgrades them onhelm upgrade. This requires users to manually runkubectl applyfor CRD upgrades and prevents GitOps tools (ArgoCD, FluxCD) from managing CRDs declaratively.Resolves percona/percona-server-mongodb-operator#1716
Solution
Add a standalone CRD chart (
psmdb-operator-crds) that places CRDs intemplates/instead ofcrds/, enabling:helm upgradeUsage
Default (backward compatible):
With CRD sub-chart enabled:
Separate CRD installation (recommended for GitOps):
Changes
charts/psmdb-operator-crds/- new standalone CRD chartcrds.enabledoption topsmdb-operatorchart (default:false)psmdb-operator-crdsas conditional dependency inpsmdb-operator/Chart.yamlBackward Compatibility
Fully backward compatible. Existing installations continue to work unchanged. The
crds/directory remains for users who don't opt into the new method.