Skip to content
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

[WIP] Move dataset.spec.mounts length validation logic from the CRD definition down into the controller #4356

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Syspretor
Copy link
Collaborator

@Syspretor Syspretor commented Oct 15, 2024

With Fluid's expansion for flexible usage of datasets, it is now permitted for the length of the mounts array in a dataset to be zero in some Runtimes. For example, the recent version supports dynamic mounting capabilities and the dataset bound with Vinyard runtime only allowed zero length mountPoints.

However, the existing definition of the Dataset Custom Resource Definition (CRD) enforces a minimum length of 1 for the Dataset.spec.mounts field. This minimum length constraint in the CRD limits the flexibility of the dataset. As datasets are intended to be an abstract collection of data and designed as mutable APIs, the validation logic for the mounts field should not be uniformly restricted by the CRD. Instead, it should be up to the runtime level to determine whether and how to impose such restrictions.

Therefore, in this pull request, I propose removing the minNum constraint on dataset.spec.mounts in the CRD and delegating the validation of the length of dataset mounts to the implementation of the controller.

Copy link

fluid-e2e-bot bot commented Oct 15, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zwwhdls for approval by writing /assign @zwwhdls in a comment. For more information see:The Kubernetes Code Review Process.

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

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

@Syspretor Syspretor force-pushed the jiuyu/support-dataset.spec.mounts-length-verification-in-runtimeController branch 2 times, most recently from 0ab950f to 687566b Compare October 15, 2024 05:54
…efinition down into the controller

Signed-off-by: jiuyu <[email protected]>
@Syspretor Syspretor force-pushed the jiuyu/support-dataset.spec.mounts-length-verification-in-runtimeController branch from 687566b to 0783fc7 Compare October 15, 2024 06:04
Copy link

sonarcloud bot commented Oct 15, 2024

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.

1 participant