Skip to content

Commit

Permalink
Merge pull request #547
Browse files Browse the repository at this point in the history
* feat: ✨ add spill storage in be config
  • Loading branch information
titigmr authored Jun 18, 2024
1 parent 3017f55 commit f58c451
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ be.conf: |
{{- print "/opt/starrocks/be/log" }}
{{- end }}

{{- define "starrockscluster.be.spill.suffix" -}}
{{- print "-spill" }}
{{- end }}

{{- define "starrockscluster.be.spill.path" -}}
{{- print "/opt/starrocks/be/spill" }}
{{- end }}

{{- define "starrockscluster.cn.data.suffix" -}}
{{- print "-data" }}
{{- end }}
Expand All @@ -131,6 +139,14 @@ be.conf: |
{{- print "/opt/starrocks/cn/log" }}
{{- end }}

{{- define "starrockscluster.cn.spill.suffix" -}}
{{- print "-spill" }}
{{- end }}

{{- define "starrockscluster.cn.spill.path" -}}
{{- print "/opt/starrocks/cn/spill" }}
{{- end }}

{{- define "starrockscluster.entrypoint.script.name" -}}
{{- print "entrypoint.sh" }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@ spec:
storageClassName: {{ .Values.starrocksBeSpec.storageSpec.storageClassName }}
storageSize: "{{ .Values.starrocksBeSpec.storageSpec.logStorageSize }}"
mountPath: {{template "starrockscluster.be.log.path" . }}
- name: {{ .Values.starrocksBeSpec.storageSpec.name }}{{template "starrockscluster.be.spill.suffix" . }}
storageClassName: {{ .Values.starrocksBeSpec.storageSpec.storageClassName }}
storageSize: "{{ .Values.starrocksBeSpec.storageSpec.spillStorageSize}}"
mountPath: {{template "starrockscluster.be.spill.path" . }}
{{- end }}
{{- if .Values.starrocksBeSpec.emptyDirs }}
{{- range .Values.starrocksBeSpec.emptyDirs }}
Expand Down Expand Up @@ -696,6 +700,10 @@ spec:
storageClassName: {{ .Values.starrocksCnSpec.storageSpec.storageClassName }}
storageSize: "{{ .Values.starrocksCnSpec.storageSpec.logStorageSize }}"
mountPath: {{template "starrockscluster.cn.log.path" . }}
- name: {{ .Values.starrocksCnSpec.storageSpec.name }}{{template "starrockscluster.cn.spill.suffix" . }}
storageClassName: {{ .Values.starrocksCnSpec.storageSpec.storageClassName }}
storageSize: "{{ .Values.starrocksCnSpec.storageSpec.spillStorageSize}}"
mountPath: {{template "starrockscluster.cn.spill.path" . }}
{{- end }}
{{- if .Values.starrocksCnSpec.emptyDirs }}
{{- range .Values.starrocksCnSpec.emptyDirs }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,10 @@ starrocksCnSpec:
# 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.
logStorageSize: 1Gi
# Setting this parameter can persist spill storage, and the mount path is /opt/starrocks/cn/spill.
# If you set it to 0Gi, the related PVC will not be created, and the spill will not be persisted.
# You need to add in be.conf spill_local_storage_dir=/opt/starrocks/cn/spill.
spillStorageSize: 0Gi
# mount emptyDir volumes if necessary.
# Note: please use storageSpec field for persistent storage data and log.
emptyDirs: []
Expand Down Expand Up @@ -795,6 +799,10 @@ starrocksBeSpec:
# 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.
logStorageSize: 1Gi
# Setting this parameter can persist spill storage, and the mount path is /opt/starrocks/be/spill.
# If you set it to 0Gi, the related PVC will not be created, and the spill will not be persisted.
# You need to add in be.conf spill_local_storage_dir=/opt/starrocks/be/spill.
spillStorageSize: 0Gi
# mount emptyDir volumes if necessary.
# Note: please use storageSpec field for persistent storage data and log.
emptyDirs: []
Expand Down
8 changes: 8 additions & 0 deletions helm-charts/charts/kube-starrocks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,10 @@ starrocks:
# 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.
logStorageSize: 1Gi
# Setting this parameter can persist spill storage, and the mount path is /opt/starrocks/cn/spill.
# If you set it to 0Gi, the related PVC will not be created, and the spill will not be persisted.
# You need to add in be.conf spill_local_storage_dir=/opt/starrocks/cn/spill.
spillStorageSize: 0Gi
# mount emptyDir volumes if necessary.
# Note: please use storageSpec field for persistent storage data and log.
emptyDirs: []
Expand Down Expand Up @@ -903,6 +907,10 @@ starrocks:
# 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.
logStorageSize: 1Gi
# Setting this parameter can persist spill storage, and the mount path is /opt/starrocks/be/spill.
# If you set it to 0Gi, the related PVC will not be created, and the spill will not be persisted.
# You need to add in be.conf spill_local_storage_dir=/opt/starrocks/be/spill.
spillStorageSize: 0Gi
# mount emptyDir volumes if necessary.
# Note: please use storageSpec field for persistent storage data and log.
emptyDirs: []
Expand Down

0 comments on commit f58c451

Please sign in to comment.