Skip to content

[Feat.] Operator Managed PVC Provisioning #32

@Al-assad

Description

@Al-assad

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.

image

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: Operator

When 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.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions