Skip to content

[Feature] Add VolumeAttributesClass support to StorageVolume - #762

Open
AdheipSingh wants to merge 3 commits into
StarRocks:mainfrom
deep-bi:feature/volume-attribute-class
Open

AdheipSingh wants to merge 3 commits into
StarRocks:mainfrom
deep-bi:feature/volume-attribute-class

Conversation

@AdheipSingh

Copy link
Copy Markdown
Contributor

Summary

  • Adds optional volumeAttributeClassName field to StorageVolume, enabling dynamic modification of EBS volume type, IOPS, and throughput via Kubernetes VolumeAttributesClass (k8s 1.31+)
  • Since the vendored k8s API (v0.26.1) lacks VolumeAttributeClassName on PVC spec, the operator patches individual PVCs at runtime using unstructured merge patches after StatefulSet reconciliation
  • Helm chart support added for all components (FE, BE, CN) and the warehouse chart

Closes #749

Changes

  • API: New optional volumeAttributeClassName field on StorageVolume
  • Operator: PatchPVCVolumeAttributeClass utility patches existing PVCs after StatefulSet apply in FE, BE, and CN controllers
  • CRDs: Updated cluster and warehouse CRD manifests
  • Helm: volumeAttributeClassName value added to FE, BE, CN storageSpec in both kube-starrocks and warehouse charts

@TiansuYu

TiansuYu commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Hey, this is super useful for our use cases as well. Looking forward for it to be released.

Just want to point out: The PVC field is volumeAttributesClassName (plural Attributes), but the PR uses singular volumeAttributeClassName everywhere, including the patch:

`{"spec":{"volumeAttributeClassName":"%s"}}`

That key doesn't match the real PVC spec, so the patch won't change IOPS/throughput.

Docs (note the plural): https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#PersistentVolumeClaimSpec

Please double check on this. :)

@TiansuYu

Copy link
Copy Markdown
Contributor

Another comment I want to make is: Is it possible to bind different VolumeAttributesClass to different types of disks (meaning VolumeAttributesClassName is not bind on top level, but can be declared per data, spill and log). For large clusters, I think this would save some bucks, especially for log disks, which doesn't need that much IO throughput.

Not necessarily has to be tackled on this PR though.

Closes StarRocks#749

Signed-off-by: AdheipSingh <adheip1222@gmail.com>
Signed-off-by: AdheipSingh <adheip1222@gmail.com>
@AdheipSingh
AdheipSingh force-pushed the feature/volume-attribute-class branch from 532a013 to b31c4c2 Compare September 14, 2026 20:05
…meAttributesClassName

PatchPVCVolumeAttributesClass lists and patches the PVCs of a StatefulSet,
but the operator had no RBAC rule for persistentvolumeclaims. Through the
cached client the list starts a PVC informer that can never sync, so setting
volumeAttributesClassName on any storage volume blocked the reconcile of the
whole cluster, not just the PVC patch.

Add get/list/watch/patch on persistentvolumeclaims to the kubebuilder
markers, config/rbac, deploy/operator.yaml and the Helm clusterrole/role.

Signed-off-by: adheip <adheip@deep.bi>
@mergify

mergify Bot commented Nov 13, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support Volume Attributes Classes to modify the volume type, IOPS, or throughput of your EBS volumes on the fly

2 participants