Skip to content

Conversation

@catpineapple
Copy link
Contributor

@catpineapple catpineapple commented Mar 18, 2025

What problem does this PR solve?

Improved the flexibility of DCR PVC configuration, configured the storage path according to fe.conf/be.conf, and implemented the configuration of be multi-data disk from ‘storage_root_path’.

storage_root_path=${DORIS_HOME}/aaa;${DORIS_HOME}/sss;${DORIS_HOME}/ddd

The above configuration allows Doris be to mount three data disks as data storage media according to the following configuration

  beSpec:
    replicas: 3
    persistentVolumes:
    - mountPath: /opt/apache-doris/be/log
      name: be-log
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
    - name: be-storage
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi

operator constructs the following pvcs:

root@VM-0-12-ubuntu:~/k8s_test# kubectl get pvc  -ndoris
NAME                                      STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
be-log-doriscluster-sample-be-0           Bound    pvc-65c07d0b-a1a8-4f35-9478-9482937893e4   1Gi        RWO            standard       2m2s
be-log-doriscluster-sample-be-1           Bound    pvc-febc6396-5f7c-42ed-833c-7019ca8063aa   1Gi        RWO            standard       2m2s
be-log-doriscluster-sample-be-2           Bound    pvc-1b4cc269-24d3-42b3-b4ac-2abb78d4b20d   1Gi        RWO            standard       2m2s
be-storage-aaa-doriscluster-sample-be-0   Bound    pvc-85061456-cdfd-43aa-b78c-4d3fe8b0b0b1   10Gi       RWO            standard       2m2s
be-storage-aaa-doriscluster-sample-be-1   Bound    pvc-ea57bc54-39eb-48bf-ab28-0b81342cd3bc   10Gi       RWO            standard       2m2s
be-storage-aaa-doriscluster-sample-be-2   Bound    pvc-c42faa27-06a9-4da3-b79d-e43a76fd1a52   10Gi       RWO            standard       2m2s
be-storage-ddd-doriscluster-sample-be-0   Bound    pvc-0a5cd375-0150-4920-ae3b-899ec7b43174   10Gi       RWO            standard       2m2s
be-storage-ddd-doriscluster-sample-be-1   Bound    pvc-f22006dd-361d-4f68-970a-a4393e6b086a   10Gi       RWO            standard       2m2s
be-storage-ddd-doriscluster-sample-be-2   Bound    pvc-a513a340-a94d-4922-9d42-736653b580c1   10Gi       RWO            standard       2m2s
be-storage-sss-doriscluster-sample-be-0   Bound    pvc-91fafd6f-7330-4a0b-b01c-b05ea11fee60   10Gi       RWO            standard       2m2s
be-storage-sss-doriscluster-sample-be-1   Bound    pvc-f88b1bcb-b989-4d50-8b07-cc4e0db2e715   10Gi       RWO            standard       2m2s
be-storage-sss-doriscluster-sample-be-2   Bound    pvc-4db82cd9-0e06-4d9e-b507-87e601108fbf   10Gi       RWO            standard       2m2s

This change is fully compatible with the previous configuration method, and the previous configuration rules can still be used.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

Copy link
Contributor

@intelligentfu8 intelligentfu8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

Copy link
Contributor

@intelligentfu8 intelligentfu8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check2

Copy link
Contributor

@intelligentfu8 intelligentfu8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check3

if pathConfig == "" {
return ""
}
path := strings.Split(strings.Split(pathConfig, ".")[0], ",")[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

write separately.

Copy link
Contributor

@intelligentfu8 intelligentfu8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

@intelligentfu8
Copy link
Contributor

LGTM

@intelligentfu8 intelligentfu8 merged commit d3899cf into apache:master Mar 24, 2025
1 check passed
@catpineapple catpineapple mentioned this pull request Mar 28, 2025
@catpineapple catpineapple deleted the pvc-modify branch December 3, 2025 10:03
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.

2 participants