fead: add CNPG - #262
Conversation
|
Warning Review limit reached
More reviews will be available in 55 minutes and 41 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughIntegrates CloudNativePG as the PostgreSQL provider: adds a CNPG Cluster manifest, operator Kustomize overlays, and switches the infra kustomization to ChangesCloudNativePG Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 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.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@deploy/k8s/infra/cnpg.yaml`:
- Line 7: The imageName field in cnpg.yaml is set to PostgreSQL 18, but the CNPG
operator pinned in deploy/k8s/operators/kustomization.yaml is version 1.22.1,
which only supports PostgreSQL versions 12 through 16. To resolve this
compatibility mismatch, either upgrade the CNPG operator version to 1.29.0 or
later in the kustomization.yaml file, or downgrade the PostgreSQL imageName to a
supported major version within the 12-16 range. Choose whichever aligns with
your infrastructure requirements.
In `@deploy/k8s/infra/migrator-job.yaml`:
- Around line 44-60: Add `readOnlyRootFilesystem: true` to the securityContext
of both containers in the Job spec. For the `wait-for-postgres` container and
the `migrator` container, locate their respective securityContext sections
(which already contain runAsNonRoot and other hardening settings) and add the
readOnlyRootFilesystem field set to true at the same indentation level as the
existing security settings. This will restrict both containers from writing to
the root filesystem, completing the security hardening of the Job resource.
In `@internal/business/handler/business/handler.go`:
- Around line 189-192: Remove the "details" field containing err.Error() from
the gin.H response object in the readiness handler to prevent exposing internal
service/database details to clients. Keep the response generic by only including
the "error" field with "service not ready". Instead, log the full error details
internally using the appropriate logger so that developers can debug the issue
while clients receive a safe, generic message.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cb37c639-8298-4c83-b517-4b8d5fe834fa
📒 Files selected for processing (11)
deploy/k8s/business/business-configmap.yamldeploy/k8s/business/business-deploy.yamldeploy/k8s/guest/deployment.yamldeploy/k8s/infra/cnpg.yamldeploy/k8s/infra/kustomization.yamldeploy/k8s/infra/migrator-job.yamldeploy/k8s/operators/business/kustomization.yamldeploy/k8s/operators/guest/kustomization.yamldeploy/k8s/operators/kustomization.yamlinternal/business/handler/business/handler.gomigrations/20260617205326_grant_business_permissions.sql
468bb57 to
19a0def
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@deploy/k8s/operators/business/example.yaml`:
- Around line 7-8: The example manifest in the business operator configuration
has conflicting settings where replicas is set to 3 but enabled is set to false,
which causes the reconciler to scale the business-api deployment to 0 replicas
despite the replicas field value. To fix this, either change enabled to true to
make the example actually run 3 pod replicas, or change replicas to 0 to
explicitly document that no pods should be running with the enabled false
configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 39e31fd3-dae6-4136-98e8-6cfc85cdde2c
📒 Files selected for processing (4)
build/Dockerfile.business-operatordeploy/k8s/operators/business/example.yamldeploy/k8s/operators/business/kustomization.yamldeploy/k8s/operators/business/operator-deployment.yaml
💤 Files with no reviewable changes (1)
- deploy/k8s/operators/business/operator-deployment.yaml
✅ Files skipped from review due to trivial changes (1)
- deploy/k8s/operators/business/kustomization.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- build/Dockerfile.business-operator
19a0def to
84aa327
Compare
Closes #260
Summary by CodeRabbit