Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Support multiple data volumes on helm chart #578

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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 }}"
Expand Down
28 changes: 24 additions & 4 deletions helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,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.
Expand Down Expand Up @@ -813,9 +823,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.
Expand Down
28 changes: 24 additions & 4 deletions helm-charts/charts/kube-starrocks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -665,9 +665,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.
Expand Down Expand Up @@ -921,9 +931,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.
Expand Down
Loading