feat(juicefs): support worker volumeClaimTemplates#5862
Conversation
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @CAICAIIs. Thanks for your PR. I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Code Review
This pull request introduces support for volumeClaimTemplates in the JuiceFSRuntime worker StatefulSet, enabling dynamic volume provisioning for JuiceFS workers. The changes encompass API and CRD updates, Helm chart modifications, and documentation revisions. The engine logic has been enhanced to manage the transformation of these templates and enforce their immutability during runtime synchronization. Furthermore, the testing suite underwent significant refactoring to replace gomonkey patching with function-based mocking, improving test stability and maintainability. I have no feedback to provide as there were no review comments to assess.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5862 +/- ##
==========================================
+ Coverage 59.10% 59.13% +0.03%
==========================================
Files 480 480
Lines 32512 32556 +44
==========================================
+ Hits 19215 19253 +38
- Misses 11747 11754 +7
+ Partials 1550 1549 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: CAICAIIs <3360776475@qq.com>
|



Ⅰ. Describe what this PR does
Support
volumeClaimTemplatesfor JuiceFS worker StatefulSet.This PR adds
spec.volumeClaimTemplatestoJuiceFSRuntime, passes it through JuiceFS value generation, and renders it into the worker StatefulSet. WorkervolumeMountscan now reference either regularspec.volumesorspec.volumeClaimTemplates.It also validates invalid worker volume configurations early:
volumeMountcannot be resolved from eithervolumesorvolumeClaimTemplatesvolumeClaimTemplateis not mounted by the workervolumeClaimTemplateschanges after the worker StatefulSet has been created, because StatefulSetvolumeClaimTemplatesare immutableⅡ. Does this pull request fix one issue?
Fixes #5191
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Added unit coverage for:
volumeClaimTemplatesvolumeClaimTemplatesvolumeClaimTemplatessync behaviorⅣ. Describe how to verify it
go test ./pkg/ddc/juicefs -count=1 -v make update-crd make gen-openapi helm lint charts/juicefs helm lint charts/fluid/fluidAlso verified Helm rendering: