-
Notifications
You must be signed in to change notification settings - Fork 1.1k
doc(fluid): Add docs for fuse sidecar-mode #5397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc(fluid): Add docs for fuse sidecar-mode #5397
Conversation
Summary of ChangesHello @Syspretor, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances Fluid's documentation by adding a detailed guide for the Fuse Sidecar mounting mode. It explains how this mode functions, contrasts it with the existing CSI mode, and provides practical examples and advanced configuration options. Furthermore, it introduces a robust cleanup script to manage HostPath directories, addressing potential resource accumulation and ensuring efficient operation of the Sidecar mode, especially in dynamic environments. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
这个 PR 增加了关于 Fuse Sidecar 模式的详细文档和一个用于清理残留 HostPath 的脚本,非常有用。文档内容详实,结构清晰,对用户理解和使用 Sidecar 模式有很大帮助。清理脚本考虑了多种安全机制,设计得非常周到。
我在代码和文档中发现了一些可以改进的地方,主要集中在清理脚本的逻辑正确性和文档示例的一致性上。请查看具体的 review comments。
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5397 +/- ##
=======================================
Coverage 57.52% 57.52%
=======================================
Files 444 444
Lines 30744 30744
=======================================
Hits 17687 17687
Misses 11443 11443
Partials 1614 1614 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive documentation for Fluid's Fuse Sidecar mounting mode, a feature designed for Serverless and resource-isolated environments. The PR introduces a new documentation file explaining the differences between CSI and Sidecar modes, along with a cleanup script to manage residual HostPath directories.
Key Changes:
- Added detailed Chinese documentation explaining Fuse Sidecar mode, its use cases, and configuration options
- Introduced a cleanup script with multiple safety mechanisms to remove stale HostPath directories in random-suffix mode
- Documented advanced configurations including random-suffix mode for node environments and PostStart hook control
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| docs/zh/samples/fuse_sidecar_mode.md | Comprehensive documentation covering Sidecar vs CSI mode comparison, setup examples, advanced configurations, and use cases for Serverless environments |
| tools/clean-sidecar-hostpath.sh | Bash script with safety checks to clean up residual HostPath directories created in random-suffix mode, including threshold-based triggers and mount point validation |
Comments suppressed due to low confidence (1)
tools/clean-sidecar-hostpath.sh:423
- The script has extra blank lines at the end (lines 422-423). While this doesn't affect functionality, it's cleaner to have only one trailing newline at the end of the file.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: 玖宇 <guotongyu.gty@alibaba-inc.com>
437f6f3 to
858bb01
Compare
|
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
这份文档详尽地介绍了 Fluid 的 Fuse Sidecar 挂载模式,内容覆盖了背景、与 CSI 模式的对比、使用示例、进阶配置、适用场景及注意事项。整体结构清晰,内容丰富,对用户理解和使用 Sidecar 模式非常有帮助。
我在文档中发现两处可以改进的地方,以提高文档的准确性和清晰度:
- 在 Sidecar 模式的工作流程描述中,关于 Webhook 查找配置的说明可以更精确,避免与 CSI 模式的 DaemonSet 概念混淆。
- 在运行示例部分,Pod 启动命令与其对应的日志输出存在不一致,修正后能让用户更顺畅地跟随示例操作。
具体的修改建议已在代码评论中给出。
|
|
||
| 1. 用户在业务 Pod 上添加特定的 label:`serverless.fluid.io/inject: "true"` | ||
| 2. Fluid Webhook 拦截 Pod 创建请求,识别需要注入 Sidecar 的 Pod | ||
| 3. Webhook 根据 Pod 挂载的 PVC 找到对应的 Fuse DaemonSet 配置 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| args: | ||
| - | | ||
| echo "Listing files in /data:" | ||
| ls -lh /data/spark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cheyang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve



Signed-off-by: 玖宇 guotongyu.gty@alibaba-inc.com
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
fixes #XXXX
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews