From c675676652f9fd9ec56b8f74692bc6e30f391cbb Mon Sep 17 00:00:00 2001 From: titigmr <56739959+titigmr@users.noreply.github.com> Date: Mon, 17 Jun 2024 21:12:09 +0000 Subject: [PATCH] feat: :sparkles: add spill storage in be config Signed-off-by: titigmr <56739959+titigmr@users.noreply.github.com> --- .../charts/starrocks/templates/_helpers.tpl | 16 ++++++++++++++++ .../starrocks/templates/starrockscluster.yaml | 8 ++++++++ .../kube-starrocks/charts/starrocks/values.yaml | 8 ++++++++ helm-charts/charts/kube-starrocks/values.yaml | 8 ++++++++ 4 files changed, 40 insertions(+) diff --git a/helm-charts/charts/kube-starrocks/charts/starrocks/templates/_helpers.tpl b/helm-charts/charts/kube-starrocks/charts/starrocks/templates/_helpers.tpl index 98950f70..7e02f757 100644 --- a/helm-charts/charts/kube-starrocks/charts/starrocks/templates/_helpers.tpl +++ b/helm-charts/charts/kube-starrocks/charts/starrocks/templates/_helpers.tpl @@ -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 }} @@ -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 }} 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 3aa40c07..42b2ca75 100644 --- a/helm-charts/charts/kube-starrocks/charts/starrocks/templates/starrockscluster.yaml +++ b/helm-charts/charts/kube-starrocks/charts/starrocks/templates/starrockscluster.yaml @@ -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 }} @@ -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 }} diff --git a/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml b/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml index 47dc5b6f..aa017e68 100644 --- a/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml +++ b/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml @@ -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: [] @@ -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: [] diff --git a/helm-charts/charts/kube-starrocks/values.yaml b/helm-charts/charts/kube-starrocks/values.yaml index bc17d327..8c470688 100644 --- a/helm-charts/charts/kube-starrocks/values.yaml +++ b/helm-charts/charts/kube-starrocks/values.yaml @@ -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: [] @@ -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: []