feat: support mountMode configuration to skip checking mount ready #4346
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.
As a premise, this PR clarifies a concept that has always existed in Fluid:
"MountMode". Historically, the processes responsible for executing the fuse mount actions have existed in two patterns: mountPod and sidecar.
The mountPod is initiated before the pod starts, performing the corresponding mount actions. Meanwhile, the NodePublishVolume interface of the Fluid CSI plugin implements a check_mount script to verify whether the mountPod has completed its mounting. However, in certain runtime scenarios where
dataset.spec.mounts
may initially be empty (such as thinRuntime or vineyard), there are no initial mount points, causing the check_mount validation of the NodePublishVolume interface to fail. This results in the inability to start pods using mountPod as the mountMode.To address this issue, this PR defines the annotation
fluid.io/skip-check-mount-ready-target
in the runtime, with possible values as follows:This annotation will be processed by the runtime engine and transmitted as PV volume attributes to the CSI plugin. In the NodePublishVolume interface logic of the CSI plugin, it will check the mount readiness only when this annotation's value is either "MountPodOnly" or "All".
For example, we can declare a runtime that bypasses the CSI plugin's mount readiness check for the mountPod during the app pod startup process.