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

[Improvement]volumeClaimTemplates模版可以支持csi设置 #8781

Closed
w7team opened this issue Jan 9, 2025 · 4 comments · Fixed by #8783
Closed

[Improvement]volumeClaimTemplates模版可以支持csi设置 #8781

w7team opened this issue Jan 9, 2025 · 4 comments · Fixed by #8783
Assignees
Labels
kind/enhancement New feature or request
Milestone

Comments

@w7team
Copy link

w7team commented Jan 9, 2025

比如存储使用longhorn时,创建的pv里可能需要对csi设置有些要求,但是有些参数又没办法写到storageclasses里,比如截图的设置,我想把创建的pv指定到某个节点上。
image

希望volumeClaimTemplates模版可以支持csi设置
image

@w7team w7team added the kind/enhancement New feature or request label Jan 9, 2025
@wangyelei wangyelei added this to the Release 0.9.2 milestone Jan 10, 2025
@zjx20
Copy link
Contributor

zjx20 commented Jan 10, 2025

The value of the volumeAttributes field in PV CR is actually from the StorageClass's parameters field, so that you can set up a proper StorageClass for your case.

Please take a look at the example provided by Longhorn. https://longhorn.io/docs/1.7.2/nodes-and-volumes/volumes/create-volumes/#creating-longhorn-volumes-with-kubectl

image

@leon-inf
Copy link
Contributor

PV volumeAttributes 在通过 pvc 创建时好像没办法直接指定。除了上面 storage class 直接配置的方法,如果需要更细致的控制,可以看下这个:https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/。这个可以扩展 KB API 支持指定 VolumeAttributesClassName。

@w7team
Copy link
Author

w7team commented Jan 10, 2025 via email

@leon-inf
Copy link
Contributor

我看kb的pvc的模板好像也不支持设置volumeAttributesClassName,只是k8s支持了

------------------ 原始邮件 ------------------ 发件人: Leon @.> 发送时间: 2025年1月10日 10:23 收件人: apecloud/kubeblocks @.> 抄送: 微擎团队 @.>, Author @.> 主题: Re: [apecloud/kubeblocks] [Improvement]volumeClaimTemplates模版可以支持csi设置 (Issue #8781)

这个我们可以扩展 API 添加一下。不过要注意 volumeAttributesClass 即使在 1.31 版本也还是 beta 状态,并且需要显式开启。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants