feat(postgres): add ClusterImageCatalog for system components#2342
feat(postgres): add ClusterImageCatalog for system components#2342IvanHunters wants to merge 1 commit intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe changes migrate PostgreSQL CNPG database configurations across five services from hardcoded image references to catalog-based resolution. Two new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request migrates the PostgreSQL database configurations for Harbor, Keycloak, Monitoring (Alerta and Grafana), and SeaweedFS to use the ClusterImageCatalog resource instead of direct image names. New ClusterImageCatalog templates have been added for each service to manage PostgreSQL 17.7 images. I have no feedback to provide.
2a6249c to
b7486ae
Compare
Protect system PostgreSQL databases from automatic major version upgrades by introducing centralized ClusterImageCatalog resources based on official CNPG artifacts repository. Changes: - Add two ClusterImageCatalog resources (bookworm and trixie OS variants) - Based on CNPG official standard images with PostgreSQL 13-17 support - PostgreSQL 18 excluded to prevent auto-upgrades - Replace hardcoded imageName with imageCatalogRef in all system databases - Add Makefile target 'update-image-catalogs' for automated catalog updates System components using catalogs: - keycloak-db → postgresql-bookworm major 17 - harbor-db → postgresql-bookworm major 17 - grafana-db → postgresql-bookworm major 17 - alerta-db → postgresql-bookworm major 17 - seaweedfs-db → postgresql-bookworm major 17 Benefits: - Catalogs deploy with operator, always available before cluster changes - Standard images include additional extensions (pgaudit, etc.) - Support for both Debian bookworm and trixie - Automated updates via 'make update-image-catalogs' - Changes propagate through OCIRepo without manual migrations Signed-off-by: IvanHunters <[email protected]>
b7486ae to
a0ddacd
Compare
Summary
Protects system PostgreSQL databases from automatic major version upgrades by introducing centralized ClusterImageCatalog resources based on official CNPG artifacts.
Background
CloudNativePG operator v1.26+ automatically triggers major version upgrades when
imageNamechanges in the Cluster spec. Legacy tag17.7is deprecated and pointed tosystemimages which are also deprecated.Solution
Deploy two shared
ClusterImageCatalogresources (bookworm and trixie) with postgres-operator using standard image type from CNPG official artifacts. Standard images provide more extensions than minimal (includes pgaudit, etc.) while system images are deprecated.Image Types Comparison
Based on CNPG postgres-containers:
Changes
ClusterImageCatalog resources:
postgresql-bookworm- Standard images on Debian bookworm (PostgreSQL 13-17)postgresql-trixie- Standard images on Debian trixie (PostgreSQL 13-17)System databases updated:
postgresql-bookwormmajor 17postgresql-bookwormmajor 17postgresql-bookwormmajor 17postgresql-bookwormmajor 17postgresql-bookwormmajor 17Makefile automation:
make update-image-catalogstargetBenefits
make update-image-catalogssyncs with upstreamUsage
Update catalogs when CNPG releases new PostgreSQL versions:
cd packages/system/postgres-operator make update-image-catalogsTest Plan
make update-image-catalogscorrectly downloads and filters catalogsSummary by CodeRabbit