k8s-deploy: add DocumentDB backend (MongoDB-compatible)#3009
k8s-deploy: add DocumentDB backend (MongoDB-compatible)#3009hossain-rayhan wants to merge 1 commit into
Conversation
Signed-off-by: Rayhan Hossain <rhossain@microsoft.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a5295bab0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| helm repo add documentdb https://documentdb.github.io/documentdb-kubernetes-operator 2>/dev/null || true | ||
| helm repo update documentdb | ||
| helm upgrade --install documentdb-operator documentdb/documentdb-operator \ | ||
| --namespace documentdb-operator --create-namespace --wait |
There was a problem hiding this comment.
Install DocumentDB operator from its OCI chart
When ENABLE_DOCUMENTDB=true, this path tries to install the operator from a conventional Helm repo, but the current upstream install docs publish the chart as an OCI artifact (oci://ghcr.io/documentdb/documentdb-operator) and note that OCI registries do not support repo-style discovery (see https://github.com/documentdb/documentdb-kubernetes-operator#install). In a fresh cluster following the new README, helm repo update documentdb / helm upgrade ... documentdb/documentdb-operator can fail to install the CRDs, leaving 02-install-database.sh unable to apply the DocumentDB resource.
Useful? React with 👍 / 👎.
Description
Adds an optional DocumentDB backend to the
k8s-deploy/flow as a single MongoDB-compatible alternative to running PostgreSQL and Neo4j side-by-side. DocumentDB (documentdb/documentdb-kubernetes-operator) ships its own operator, so this PR wires it in alongside the existing KubeBlocks-based databases rather than as a KubeBlocks addon.DocumentDB itself is not GA yet (upstream notes: "under active development but not yet recommended for production use"), so the README places it under a clearly-labeled Preview / Experimental section, separate from the Production Deployment flow.
Related Issues
N/A — inspired by documentdb/documentdb-kubernetes-operator#362.
Changes Made
New folder (mirrors siblings like
databases/postgresql/,databases/neo4j/):k8s-deploy/databases/documentdb/values.yaml— single-nodeDocumentDBCR +docdb-credentialsSecret (placeholder password), images pinned toghcr.io/documentdb/documentdb-kubernetes-operator/{documentdb,gateway}:0.110.0.Wiring into the existing scripts (all gated on
ENABLE_DOCUMENTDB=falseby default):databases/00-config.sh— addedENABLE_DOCUMENTDBflag with a note that it uses its own operator (not KubeBlocks).databases/01-prepare.sh— installs cert-manager (only if missing) and the DocumentDB operator Helm chart into thedocumentdb-operatornamespace.databases/02-install-database.sh— applies the CR + Secret and waits forstatus.status="Cluster in healthy state".databases/03-uninstall-database.sh— deletes the CR.databases/04-cleanup.sh— uninstalls the DocumentDB operator (cert-manager intentionally left in place).lightrag/values.yaml— addsMONGO_DATABASE: lightragplus comments documenting the override env vars.install_lightrag.sh— sources00-config.sh, gates PG/Neo4j password lookups on theirENABLE_*flags, and adds a DocumentDB block that:status.connectionStringfrom the DocumentDB resource,eval-resolves the embedded$(kubectl get secret …)substitution,replicaSet=rs0(which conflicts withdirectConnection=truein pymongo),LIGHTRAG_KV_STORAGE=MongoKVStorage,LIGHTRAG_GRAPH_STORAGE=MongoGraphStorage,LIGHTRAG_DOC_STATUS_STORAGE=MongoDocStatusStorage, andLIGHTRAG_VECTOR_STORAGE=NanoVectorDBStorage.Docs:
k8s-deploy/README.md— new top-level Preview / Experimental: DocumentDB Backend section after Production Deployment, with ak8s-deploy/databases/README.md— short note in step 3 about the auto-install.Checklist
k8s-deploy/README.md,k8s-deploy/databases/README.md)bash -npasses on all modified scripts)Additional Notes
$vectorSearchoperator thatMongoVectorDBStoragerequires, so embeddings stay on the LightRAG PVC viaNanoVectorDBStorage. KV / graph / doc-status data do live in DocumentDB collections.ImageVolumefeature.createIndex.collation is not implemented yetandPipeline stage name not recognized: $listSearchIndexes.ENABLE_DOCUMENTDB=false(the default).