Skip to content

Conversation

@Syspretor
Copy link
Collaborator

@Syspretor Syspretor commented Jul 21, 2025

Currently, Fluid injects the Fuse Client into Serverless Pods as a Sidecar to support Fuse Client integration in Serverless environments. The Sidecar handles data source mounting and propagates the mount point through HostPath.

In standard nodes, Fluid follows the typical CSI processing flow and tags the node with the Fuse Daemonset NodeSelector during the NodeStageVolume process. This results in a Daemonset Pod being deployed on the node to provide mount points for Pods referencing the dataset on that node. This involves the creation of a Daemonset and the Fluid CSI-plugin tagging the node, which triggers the Kubernetes Controller Manager (KCM) to expand the Daemonset on the node. When the scale of nodes or datasets is large, this can put significant pressure on the KCM. Consequently, there has emerged a need in standard nodes to integrate the Fuse Client via a sidecar approach as well.

However, when using the sidecar mode in standard nodes, the current code assigns the same hostpath to different pods using the same dataset. This can cause mounting conflicts when these pods are scheduled on the same node. Therefore, this PR aims to address this issue by providing two methods for generating hostpaths in sidecar mode.

apiVersion: v1
kind: Pod
metadata:
  name: test
  labels:
    serverless.fluid.io/inject: "true" 
  annotations:
    default.fuse-sidecar.fluid.io/host-mount-path-mode: "random-suffix" # support random-suffix and fixed

@Syspretor Syspretor changed the title support unique hostpath for fuse sidecar mode in webhook [WIP] support unique hostpath for fuse sidecar mode in webhook Jul 21, 2025
@Syspretor Syspretor force-pushed the feature/support-unique-hostpath-for-sidecar-mode branch from f57674a to 950650f Compare July 21, 2025 07:23
Signed-off-by: 玖宇 <guotongyu.gty@alibaba-inc.com>
@Syspretor Syspretor force-pushed the feature/support-unique-hostpath-for-sidecar-mode branch from 950650f to 05a3d7c Compare July 21, 2025 07:32
@sonarqubecloud
Copy link

@Syspretor Syspretor changed the title [WIP] support unique hostpath for fuse sidecar mode in webhook Support unique hostpath for fuse sidecar mode in webhook Aug 6, 2025
@cheyang cheyang requested a review from TrafalgarZZZ August 6, 2025 15:29
Copy link
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Aug 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fluid-e2e-bot fluid-e2e-bot bot merged commit 3c2ab83 into fluid-cloudnative:master Aug 7, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants