-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The standard approach to provision persistence volumes in Kubernetes is to rely on StatefulSet. VolumeClaimTemplate can be defined in StatefulSet, and it is used to create PersistentVolumeClaim (PVC), and PersistentVolume. This is convenient, since both PodTemplate and VolumeClaimTemplate are defined in one resource.
The main problem is that the StatefulSet does not allow modifications to templates. So if a change is needed to the PVC, such as extending the volume size, the Operator has to re-create the StatefulSet, which results in Doris FE/BE restart. Restarts may be expensive and undesirable on big clusters.
Solution
Add a storage management setting that defines if PVC needs to be provisioned by the StatefulSet or the operator in DorisCluster CRD. The operator managed persistence can be turned on like this:
# DorisCluster
spec:
pvcManagement: OperatorWhen enabled, there is no PVC template in the StatefulSet anymore; the Operator creates and modifies PVC directly. The big benefit for users: we can rescale volumes without a Doris FE/BE restart.

