k8s-deploy: add DocumentDB backend (MongoDB-compatible)#3009
Open
hossain-rayhan wants to merge 1 commit intoHKUDS:mainfrom
Open
k8s-deploy: add DocumentDB backend (MongoDB-compatible)#3009hossain-rayhan wants to merge 1 commit intoHKUDS:mainfrom
hossain-rayhan wants to merge 1 commit intoHKUDS:mainfrom
Conversation
Signed-off-by: Rayhan Hossain <rhossain@microsoft.com>
xgerman
approved these changes
May 1, 2026
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
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
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).