Skip to content

[improve](dcr) support pvc template and be multi-data disk - #364

Merged
intelligentfu8 merged 7 commits into
apache:masterfrom
catpineapple:pvc-modify
Mar 24, 2025
Merged

[improve](dcr) support pvc template and be multi-data disk#364
intelligentfu8 merged 7 commits into
apache:masterfrom
catpineapple:pvc-modify

Conversation

@catpineapple

@catpineapplecatpineapple commented Mar 18, 2025

Copy link
Copy Markdown
Member

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: 3persistentVolumes:
- mountPath: /opt/apache-doris/be/logname: be-logpersistentVolumeClaimSpec:
accessModes:
- ReadWriteOnceresources:
requests:
storage: 1Gi
- name: be-storagepersistentVolumeClaimSpec:
accessModes:
- ReadWriteOnceresources:
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

Comment threadpkg/common/utils/doris/storage_conf.go Outdated
Comment threadpkg/common/utils/doris/storage_conf.go Outdated
Comment threadpkg/common/utils/doris/storage_conf.go Outdated
Comment threadpkg/common/utils/doris/storage_conf.go Outdated
Comment threadpkg/common/utils/resource/configmap.go
Comment threadpkg/common/utils/resource/persistent_volume_claim.go Outdated

@intelligentfu8intelligentfu8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check

Comment threadpkg/common/utils/resource/persistent_volume_claim.go Outdated
Comment threadpkg/common/utils/resource/persistent_volume_claim.go
Comment threadpkg/common/utils/resource/persistent_volume_claim.go Outdated

@intelligentfu8intelligentfu8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check2

Comment threadpkg/common/utils/resource/persistent_volume_claim.go Outdated

@intelligentfu8intelligentfu8 left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

write separately.

Comment threadpkg/common/utils/doris/storage_conf.go

@intelligentfu8intelligentfu8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check

@intelligentfu8

Copy link
Copy Markdown
Contributor

LGTM

@intelligentfu8
intelligentfu8 merged commit d3899cf into apache:masterMar 24, 2025
@catpineapplecatpineapple mentioned this pull request Mar 28, 2025
@catpineapple
catpineapple deleted the pvc-modify branch December 3, 2025 10:03
Sign up for freeto 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

@catpineapple@intelligentfu8