From a02f40065391eb212ea5c4574ab664e4fac96bbc 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 | 8 ++++++++ .../charts/starrocks/templates/starrockscluster.yaml | 4 ++++ .../charts/kube-starrocks/charts/starrocks/values.yaml | 4 ++++ helm-charts/charts/kube-starrocks/values.yaml | 4 ++++ 4 files changed, 20 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..aba1062c 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 }} 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..d80f4154 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 }} diff --git a/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml b/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml index 47dc5b6f..86214725 100644 --- a/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml +++ b/helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml @@ -795,6 +795,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..7b6d4714 100644 --- a/helm-charts/charts/kube-starrocks/values.yaml +++ b/helm-charts/charts/kube-starrocks/values.yaml @@ -903,6 +903,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: []