feat(dataset): add workspace share access policy / 支持工作空间共享访问策略 - #87
Merged
Merged
Conversation
yyzxw
reviewed
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat(dataset): add workspace share access policy / 支持工作空间共享访问策略
中文
概述
为共享 Dataset 的引用挂载增加按目标工作空间控制的读写权限策略。
spec.shareAccess规则,通过 CRD 校验读写模式和命名空间选择器。status.mountSources与MountPolicy状态条件,记录并验证引用链的实际挂载授权。pkg/mountpolicy,统一解析引用链、校验 Dataset/PVC/PV 身份,并在异常时默认拒绝访问。shareAccess的历史共享 Dataset 继续按只读方式授权。测试
shareAccessCRD/CEL 校验的 envtest 覆盖。升级注意事项
本次变更更新了 Dataset CRD schema,并新增
shareAccess、mountSources及相关 CEL 校验。
当前 Chart 发布流程会将
config/crd/bases/*复制到 Chart 的templates/目录,因此 Helm upgrade 会尝试更新 CRD;但不建议依赖 Helm管理 CRD 生命周期。
升级时请先显式应用 CRD,再升级 Chart:
若未来将 CRD 移至 Chart 的
crds/目录,Helm 只会在首次安装时创建 CRD,不会在
helm upgrade --install时更新它;届时上述显式 CRD 升级步骤仍为必需。English
Summary
Add workspace-scoped read/write access policies for shared Dataset reference
mounts.
spec.shareAccessrules with CRD validation for access modesand namespace selectors.
status.mountSourcesand aMountPolicycondition to record and verifyeffective reference-mount authorization.
pkg/mountpolicyto resolve reference chains, verifyDataset/PVC/PV identities, and fail closed on authorization errors.
changes, safely clone reference PVs, and prevent authorization bypasses
through reference PVC aliases.
shareAccesscontinue to grant read-only access.
Tests
storage-identity verification.
recovery, and PVC alias-bypass protection.
shareAccessCRD/CEL validation.Upgrade Notes
This change updates the Dataset CRD schema and adds
shareAccess,mountSources, and related CEL validations.The current chart publishing workflow copies
config/crd/bases/*into thechart's
templates/directory, so Helm upgrade will attempt to update theCRD. However, CRD lifecycle management should not rely on Helm.
Apply the CRD explicitly before upgrading the chart:
If the CRD is moved to the chart's
crds/directory in the future, Helm willcreate it only during the initial installation and will not update it during
helm upgrade --install. The explicit CRD upgrade step above remains required.