diff --git a/helm-charts/charts/kube-starrocks/charts/starrocks/templates/starrockscluster.yaml b/helm-charts/charts/kube-starrocks/charts/starrocks/templates/starrockscluster.yaml index 2dc7e1e9..efffa20d 100644 --- a/helm-charts/charts/kube-starrocks/charts/starrocks/templates/starrockscluster.yaml +++ b/helm-charts/charts/kube-starrocks/charts/starrocks/templates/starrockscluster.yaml @@ -452,10 +452,23 @@ spec: {{- if or .Values.starrocksBeSpec.storageSpec.name .Values.starrocksBeSpec.emptyDirs .Values.starrocksBeSpec.hostPaths }} storageVolumes: {{- if .Values.starrocksBeSpec.storageSpec.name }} + {{- if gt (int .Values.starrocksBeSpec.storageSpec.storageCount) 1 }} + {{- $storageName := .Values.starrocksBeSpec.storageSpec.name -}} + {{- $storageClassName := .Values.starrocksBeSpec.storageSpec.storageClassName -}} + {{- $storageSize := .Values.starrocksBeSpec.storageSpec.storageSize -}} + {{- $storageMountPath := include "starrockscluster.be.data.path" . -}} + {{- range $i, $e := until (int .Values.starrocksBeSpec.storageSpec.storageCount) }} + - name: {{ $storageName }}{{ $i }}{{template "starrockscluster.be.data.suffix" . }} + storageClassName: {{ $storageClassName }} + storageSize: "{{ $storageSize }}" + mountPath: {{ $storageMountPath }}{{ $i }} + {{- end }} + {{- else}} - name: {{ .Values.starrocksBeSpec.storageSpec.name }}{{template "starrockscluster.be.data.suffix" . }} storageClassName: {{ .Values.starrocksBeSpec.storageSpec.storageClassName }} storageSize: "{{ .Values.starrocksBeSpec.storageSpec.storageSize }}" mountPath: {{template "starrockscluster.be.data.path" . }} + {{- end }} - name: {{ .Values.starrocksBeSpec.storageSpec.name }}{{template "starrockscluster.be.log.suffix" . }} storageClassName: {{ .Values.starrocksBeSpec.storageSpec.storageClassName }} storageSize: "{{ .Values.starrocksBeSpec.storageSpec.logStorageSize }}" @@ -704,10 +717,23 @@ spec: {{- if or .Values.starrocksCnSpec.storageSpec.name .Values.starrocksCnSpec.emptyDirs .Values.starrocksCnSpec.hostPaths }} storageVolumes: {{- if .Values.starrocksCnSpec.storageSpec.name }} + {{- if gt (int .Values.starrocksCnSpec.storageSpec.storageCount) 1 }} + {{- $storageName := .Values.starrocksCnSpec.storageSpec.name -}} + {{- $storageClassName := .Values.starrocksCnSpec.storageSpec.storageClassName -}} + {{- $storageSize := .Values.starrocksCnSpec.storageSpec.storageSize -}} + {{- $storageMountPath := include "starrockscluster.cn.data.path" . -}} + {{- range $i, $e := until (int .Values.starrocksCnSpec.storageSpec.storageCount) }} + - name: {{ $storageName }}{{ $i }}{{template "starrockscluster.cn.data.suffix" . }} + storageClassName: {{ $storageClassName }} + storageSize: "{{ $storageSize }}" + mountPath: {{ $storageMountPath }}{{ $i }} + {{- end }} + {{- else }} - name: {{ .Values.starrocksCnSpec.storageSpec.name }}{{template "starrockscluster.cn.data.suffix" . }} storageClassName: {{ .Values.starrocksCnSpec.storageSpec.storageClassName }} storageSize: "{{ .Values.starrocksCnSpec.storageSpec.storageSize }}" mountPath: {{template "starrockscluster.cn.data.path" . }} + {{- end }} - name: {{ .Values.starrocksCnSpec.storageSpec.name }}{{template "starrockscluster.cn.log.suffix" . }} storageClassName: {{ .Values.starrocksCnSpec.storageSpec.storageClassName }} storageSize: "{{ .Values.starrocksCnSpec.storageSpec.logStorageSize }}" diff --git a/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml b/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml index b3fe18f6..730e1d0f 100644 --- a/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml +++ b/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml @@ -560,9 +560,19 @@ starrocksCnSpec: # You must set name when you set storageClassName # Note: Because hostPath field is not supported here, hostPath is not allowed to be set in storageClassName. storageClassName: "" - # the storage size of persistent volume for data. + # the storage size of per persistent volume for data. storageSize: 1Ti - # If storageMountPath is empty, the storageMountPath will be set to /opt/starrocks/cn/storage. + # the number of persistent volumes for data. + # if storageCount == 1 + # the storageMountPath field is used to specify the mount path of the persistent volume. If storageMountPath is empty, + # the storageMountPath will be set to /opt/starrocks/cn/storage. + # If storageMountPath is not /opt/starrocks/cn/storage, you must add in config the following configuration: storage_root_path = xxx. + # if storageCount > 1 + # the storageMountPath field is used to specify the prefix of mount path of the persistent volume. For example, if the + # storageMountPath is /opt/starrocks/cn/storage, the real mount path will be /opt/starrocks/cn/storage0, /opt/starrocks/cn/storage1, ... + # You must add in config the following configuration: storage_root_path = /opt/starrocks/cn/storage0;/opt/starrocks/cn/storage1;... + storageCount: 1 + # see the comment of storageCount for the usage of storageMountPath. storageMountPath: "" # the storage size of persistent volume for log, and the mount path is /opt/starrocks/cn/log. # If you set it to 0Gi, the related PVC will not be created, and the log will not be persisted. @@ -819,9 +829,19 @@ starrocksBeSpec: # You must set name when you set storageClassName # Note: Because hostPath field is not supported here, hostPath is not allowed to be set in storageClassName. storageClassName: "" - # the storage size of persistent volume for data. + # the storage size of per persistent volume for data. storageSize: 1Ti - # If storageMountPath is empty, the storageMountPath will be set to /opt/starrocks/be/storage. + # the number of persistent volumes for data. + # if storageCount == 1 + # the storageMountPath field is used to specify the mount path of the persistent volume. If storageMountPath is empty, + # the storageMountPath will be set to /opt/starrocks/be/storage. + # If storageMountPath /opt/starrocks/be/storage, you must add in config the following configuration: storage_root_path = xxx. + # if storageCount > 1 + # the storageMountPath field is used to specify the prefix of mount path of the persistent volume. For example, if the + # storageMountPath is /opt/starrocks/be/storage, the real mount path will be /opt/starrocks/be/storage0, /opt/starrocks/be/storage1, ... + # You must add in config the following configuration: storage_root_path = /opt/starrocks/be/storage0;/opt/starrocks/be/storage1;... + storageCount: 1 + # see the comment of storageCount for the usage of storageMountPath. storageMountPath: "" # Setting this parameter can persist log storage, and the mount path is /opt/starrocks/be/log. # If you set it to 0Gi, the related PVC will not be created, and the log will not be persisted. diff --git a/helm-charts/charts/kube-starrocks/values.yaml b/helm-charts/charts/kube-starrocks/values.yaml index 72678934..a55bfda7 100644 --- a/helm-charts/charts/kube-starrocks/values.yaml +++ b/helm-charts/charts/kube-starrocks/values.yaml @@ -668,9 +668,19 @@ starrocks: # You must set name when you set storageClassName # Note: Because hostPath field is not supported here, hostPath is not allowed to be set in storageClassName. storageClassName: "" - # the storage size of persistent volume for data. + # the storage size of per persistent volume for data. storageSize: 1Ti - # If storageMountPath is empty, the storageMountPath will be set to /opt/starrocks/cn/storage. + # the number of persistent volumes for data. + # if storageCount == 1 + # the storageMountPath field is used to specify the mount path of the persistent volume. If storageMountPath is empty, + # the storageMountPath will be set to /opt/starrocks/cn/storage. + # If storageMountPath is not /opt/starrocks/cn/storage, you must add in config the following configuration: storage_root_path = xxx. + # if storageCount > 1 + # the storageMountPath field is used to specify the prefix of mount path of the persistent volume. For example, if the + # storageMountPath is /opt/starrocks/cn/storage, the real mount path will be /opt/starrocks/cn/storage0, /opt/starrocks/cn/storage1, ... + # You must add in config the following configuration: storage_root_path = /opt/starrocks/cn/storage0;/opt/starrocks/cn/storage1;... + storageCount: 1 + # see the comment of storageCount for the usage of storageMountPath. storageMountPath: "" # the storage size of persistent volume for log, and the mount path is /opt/starrocks/cn/log. # If you set it to 0Gi, the related PVC will not be created, and the log will not be persisted. @@ -927,9 +937,19 @@ starrocks: # You must set name when you set storageClassName # Note: Because hostPath field is not supported here, hostPath is not allowed to be set in storageClassName. storageClassName: "" - # the storage size of persistent volume for data. + # the storage size of per persistent volume for data. storageSize: 1Ti - # If storageMountPath is empty, the storageMountPath will be set to /opt/starrocks/be/storage. + # the number of persistent volumes for data. + # if storageCount == 1 + # the storageMountPath field is used to specify the mount path of the persistent volume. If storageMountPath is empty, + # the storageMountPath will be set to /opt/starrocks/be/storage. + # If storageMountPath /opt/starrocks/be/storage, you must add in config the following configuration: storage_root_path = xxx. + # if storageCount > 1 + # the storageMountPath field is used to specify the prefix of mount path of the persistent volume. For example, if the + # storageMountPath is /opt/starrocks/be/storage, the real mount path will be /opt/starrocks/be/storage0, /opt/starrocks/be/storage1, ... + # You must add in config the following configuration: storage_root_path = /opt/starrocks/be/storage0;/opt/starrocks/be/storage1;... + storageCount: 1 + # see the comment of storageCount for the usage of storageMountPath. storageMountPath: "" # Setting this parameter can persist log storage, and the mount path is /opt/starrocks/be/log. # If you set it to 0Gi, the related PVC will not be created, and the log will not be persisted.