fix(helm): add shared volume support for docreader artifacts#1778
fix(helm): add shared volume support for docreader artifacts#1778lordk911 wants to merge 3 commits into
Conversation
- Section 12.8: Mark docreader shared volume gap as resolved with PR link - Section 12.9: Update prerequisite item 5 to reflect PVC creation - Section 12.11: Update risk section to show issue is resolved - Add PR Tencent#1778 to references Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| # -- Enable shared volume for docreader artifacts | ||
| enabled: true | ||
| # -- Volume type: "emptyDir" (single-node/testing) or "pvc" (multi-node/production) | ||
| # For production with multiple replicas, use "pvc" with ReadWriteMany (e.g., cephfs, NFS) |
There was a problem hiding this comment.
Default emptyDir cannot share data between app and docreader, so default sharedVolume.enabled should be flase ?
There was a problem hiding this comment.
this file should be removed
| # -- Size limit for emptyDir (only used when type=emptyDir) | ||
| sizeLimit: 5Gi | ||
| # -- PVC name (only used when type=pvc) | ||
| # If empty and type=pvc, a PVC will be created with name: <release-name>-docreader-tmp |
There was a problem hiding this comment.
PVC auto-creation is documented but not implemented
The docker-compose.yml configuration shares a 'docreader-tmp' volume between docreader (read-write) and app (read-only) for document parsing artifacts (extracted images, etc.). This was missing from the Helm chart. Added configurable sharedVolume support: - docreader.yaml: mount /tmp/docreader (read-write) - app.yaml: mount /tmp/docreader (read-only) - values.yaml: docreader.sharedVolume config with emptyDir (default) or PVC support for multi-node/production deployments This aligns the Helm chart with docker-compose.yml behavior and enables proper document parsing with image extraction in Kubernetes deployments. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1. Default sharedVolume.enabled to false (backward compatible). emptyDir is pod-scoped and cannot share data between the app and docreader Deployments; enabling requires type=pvc with ReadWriteMany. 2. Implement PVC auto-creation (docreader-pvc.yaml template) that was documented but missing. Creates a PVC when type=pvc and pvcName is empty. 3. Add accessMode config (defaults to ReadWriteMany) for the auto-created PVC. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
075d333 to
aa5e26e
Compare
|
Thanks for the review @lyingbug! All three points addressed in the latest push: 1. Default 2. Removed 3. Implemented PVC auto-creation ( The branch is now focused solely on the Helm chart shared-volume fix (2 commits). Please take another look when you have time. |
Add a Docreader section to the README with the sharedVolume parameters, explain the emptyDir limitation (pod-scoped, cannot share across the app and docreader Deployments), and include a production example with cephfs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary
This PR adds configurable shared volume support to the Helm chart, aligning it with the
docker-compose.ymlconfiguration.Problem
The
docker-compose.ymlshares adocreader-tmpvolume between:/tmp/docreader) — writes extracted images during document parsing/tmp/docreader) — reads images for display and VLM analysisThis shared volume configuration was missing from the Helm chart:
docreader.yamlhad no volumes or volumeMounts at allapp.yamlonly haddata-filesvolume, nodocreader-tmpmountThis caused document parsing with image extraction to fail in Kubernetes deployments using the Helm chart.
Solution
Added configurable
docreader.sharedVolumesupport:1.
values.yaml2.
docreader.yamlAdded volumeMount (
/tmp/docreader, read-write) and volume definition.3.
app.yamlAdded volumeMount (
/tmp/docreader, read-only) and volume definition.Usage Examples
Single-node / Testing (emptyDir, default)
Production / Multi-node (PVC with ReadWriteMany)
Or let the chart create the PVC:
Testing
emptyDirandpvcconfigurationsemptyDirworks for single-node testingRelated
docker-compose.ymlbehavior