refactor(doclet): migrate postgres and nats components to resources#46
refactor(doclet): migrate postgres and nats components to resources#46kavix wants to merge 1 commit into
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 (20)
💤 Files with no reviewable changes (10)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughMigrates doclet NATS and Postgres to managed resources with resource release bindings, rewires dependent workloads to the resources model, removes the old component-based manifests, and updates GitOps repository URLs in Flux and workflow templates. ChangesDoclet resource migration
GitOps repository URL updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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: 2
🤖 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 `@namespaces/default/projects/doclet/bindings/development/nats.yaml`:
- Around line 12-16: The shared development NATS binding currently enables the
unauthenticated admin `/varz` endpoint via
resourceTypeEnvironmentConfigs.adminEnabled, which should not be on by default.
Update this binding to keep adminEnabled disabled here and move any demo-only
exposure into a separate demo overlay or equivalent demo-specific config, using
the existing resourceTypeEnvironmentConfigs block as the place to adjust the
setting.
In `@namespaces/default/projects/doclet/bindings/development/postgres.yaml`:
- Around line 12-15: The development Postgres config currently enables the
gateway-exposed Adminer demo superuser, which should not be shipped in this
environment. Update the resourceTypeEnvironmentConfigs in postgres.yaml so
adminEnabled is disabled by default for development, and only allow it behind an
explicit, narrowly scoped opt-in if needed. Use the adminEnabled setting as the
main symbol to locate and change this behavior.
🪄 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: 5ac2465f-3c8e-4bf1-85cf-3e2e6cd58086
📒 Files selected for processing (16)
namespaces/default/projects/doclet/bindings/development/nats.yamlnamespaces/default/projects/doclet/bindings/development/postgres.yamlnamespaces/default/projects/doclet/components/collab-svc/workload.yamlnamespaces/default/projects/doclet/components/document-svc/workload.yamlnamespaces/default/projects/doclet/components/nats/component.yamlnamespaces/default/projects/doclet/components/nats/release-bindings/nats-development.yamlnamespaces/default/projects/doclet/components/nats/release-bindings/nats-staging.yamlnamespaces/default/projects/doclet/components/nats/releases/nats-20260223-1.yamlnamespaces/default/projects/doclet/components/nats/workload.yamlnamespaces/default/projects/doclet/components/postgres/component.yamlnamespaces/default/projects/doclet/components/postgres/release-bindings/postgres-development.yamlnamespaces/default/projects/doclet/components/postgres/release-bindings/postgres-staging.yamlnamespaces/default/projects/doclet/components/postgres/releases/postgres-20260223-1.yamlnamespaces/default/projects/doclet/components/postgres/workload.yamlnamespaces/default/projects/doclet/resources/nats.yamlnamespaces/default/projects/doclet/resources/postgres.yaml
💤 Files with no reviewable changes (10)
- namespaces/default/projects/doclet/components/postgres/release-bindings/postgres-staging.yaml
- namespaces/default/projects/doclet/components/nats/release-bindings/nats-staging.yaml
- namespaces/default/projects/doclet/components/nats/component.yaml
- namespaces/default/projects/doclet/components/postgres/component.yaml
- namespaces/default/projects/doclet/components/postgres/release-bindings/postgres-development.yaml
- namespaces/default/projects/doclet/components/postgres/releases/postgres-20260223-1.yaml
- namespaces/default/projects/doclet/components/nats/workload.yaml
- namespaces/default/projects/doclet/components/nats/release-bindings/nats-development.yaml
- namespaces/default/projects/doclet/components/postgres/workload.yaml
- namespaces/default/projects/doclet/components/nats/releases/nats-20260223-1.yaml
40daef3 to
4f125e3
Compare
…nd disable admin UIs by default in development Signed-off-by: kavix <kavix@yahoo.com>
c8ccd87 to
6b547c2
Compare
|
@kavix Thanks for your contribution. Did you verify the full setup after this change? if not can you please follow the guide in https://openchoreo.dev/docs/next/platform-engineer-guide/gitops/using-flux-cd/#tutorial and verify the full setup with your changes? |
@VajiraPrabuddhaka Yes! I couldn't run the full OpenChoreo platform setup locally (my machine only has 8GB RAM, so Docker runs out of memory during make e2e.setup E2E_WITH_BUILD=true). However, to ensure the changes work, I spun up a lightweight k3d cluster and installed Flux CD to verify the GitOps flow directly. Flux successfully pulls the fork without authentication issues using the updated URLs. Here is the verification output showing the successful repository sync: Let me know if you need anything else! |
711184d to
6b547c2
Compare
Purpose
Migrate the Doclet application's database and messaging dependencies (Postgres and NATS) from plain Component abstractions to Resource abstractions in the GitOps repository. This aligns the repository with the in-repo doclet templates.
Resolves #3107
Relates to openchoreo/openchoreo#4027
Approach
postgres/andnats/component folders undernamespaces/default/projects/doclet/components/.namespaces/default/projects/doclet/resources/.namespaces/default/projects/doclet/bindings/development/.document-svcandcollab-svcworkload files to consume the newdoclet-postgresanddoclet-natsresource dependencies instead of the component endpoints. Removed hardcoded DB username and password from the document-svc workload.Related Issues
Checklist
Remarks
Verified files syntax locally using
yq.Summary by CodeRabbit
New Features
Bug Fixes