From 3600c6b02f221ce8e5ba436ec97a9d3f27aceadc Mon Sep 17 00:00:00 2001 From: vmaksimovski <12010235+vmaksimovski@users.noreply.github.com> Date: Mon, 9 Dec 2024 01:34:52 -0500 Subject: [PATCH 1/3] Create risingwave-sqlite-local-disk.yaml --- .../risingwave-sqlite-local-disk.yaml | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml diff --git a/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml b/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml new file mode 100644 index 00000000..ae56e432 --- /dev/null +++ b/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml @@ -0,0 +1,112 @@ +apiVersion: risingwave.risingwavelabs.com/v1alpha1 +kind: RisingWave +metadata: + name: risingwave-sqlite-local-disk +spec: + image: risingwavelabs/risingwave:v2.1.0 + metaStore: + sqlite: + path: /risingwave/data/metastore/risingwave.db + stateStore: + localDisk: + root: /var/lib/risingwave/data + components: + meta: + nodeGroups: + - replicas: 1 + name: "" + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 20Gi + template: + spec: + volumes: + - name: heap + emptyDir: + sizeLimit: 1Gi + volumeMounts: + - mountPath: /heap + name: heap + - mountPath: /risingwave/data/metastore + name: data + subPath: metastore + env: + - name: MALLOC_CONF + value: prof:true,lg_prof_interval:-1,lg_prof_sample:20,prof_prefix:/heap/ + - name: RW_HEAP_PROFILING_DIR + value: /heap + resources: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 1 + memory: 2Gi + frontend: + nodeGroups: + - replicas: 1 + name: "" + template: + spec: + resources: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 1 + memory: 2Gi + compute: + nodeGroups: + - replicas: 1 + name: "" + template: + spec: + volumes: + - name: heap + emptyDir: + sizeLimit: 1Gi + volumeMounts: + - mountPath: /heap + name: heap + env: + - name: MALLOC_CONF + value: prof:true,lg_prof_interval:-1,lg_prof_sample:20,prof_prefix:/heap/ + - name: RW_HEAP_PROFILING_DIR + value: /heap + resources: + limits: + cpu: 8 + memory: 32Gi # Memory limit will be set to `RW_TOTAL_MEMORY_BYTES` + requests: + cpu: 8 + memory: 32Gi + compactor: + nodeGroups: + - replicas: 1 + name: "" + template: + spec: + volumes: + - name: heap + emptyDir: + sizeLimit: 1Gi + volumeMounts: + - mountPath: /heap + name: heap + env: + - name: MALLOC_CONF + value: prof:true,lg_prof_interval:-1,lg_prof_sample:20,prof_prefix:/heap/ + - name: RW_HEAP_PROFILING_DIR + value: /heap + resources: + limits: + cpu: 4 + memory: 8Gi + requests: + cpu: 4 + memory: 8Gi From f2f1f75b958b056c27aa1791e4b9e94dc17e07fe Mon Sep 17 00:00:00 2001 From: vmaksimovski <12010235+vmaksimovski@users.noreply.github.com> Date: Mon, 9 Dec 2024 02:02:27 -0500 Subject: [PATCH 2/3] Update risingwave-sqlite-local-disk.yaml --- .../risingwave-sqlite-local-disk.yaml | 93 +++++++++---------- 1 file changed, 44 insertions(+), 49 deletions(-) diff --git a/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml b/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml index ae56e432..9fa2c024 100644 --- a/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml +++ b/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml @@ -13,33 +13,17 @@ spec: components: meta: nodeGroups: - - replicas: 1 - name: "" - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 20Gi + - name: "" + replicas: 1 template: spec: volumes: - - name: heap - emptyDir: - sizeLimit: 1Gi + - name: risingwave-data + persistentVolumeClaim: + claimName: risingwave-data volumeMounts: - - mountPath: /heap - name: heap - - mountPath: /risingwave/data/metastore - name: data - subPath: metastore - env: - - name: MALLOC_CONF - value: prof:true,lg_prof_interval:-1,lg_prof_sample:20,prof_prefix:/heap/ - - name: RW_HEAP_PROFILING_DIR - value: /heap + - mountPath: /var/lib/risingwave/data + name: risingwave-data resources: limits: cpu: 1 @@ -49,10 +33,17 @@ spec: memory: 2Gi frontend: nodeGroups: - - replicas: 1 - name: "" + - name: "" + replicas: 1 template: spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + risingwave/component: meta resources: limits: cpu: 1 @@ -62,22 +53,24 @@ spec: memory: 2Gi compute: nodeGroups: - - replicas: 1 - name: "" + - name: "" + replicas: 1 template: spec: volumes: - - name: heap - emptyDir: - sizeLimit: 1Gi + - name: risingwave-data + persistentVolumeClaim: + claimName: risingwave-data volumeMounts: - - mountPath: /heap - name: heap - env: - - name: MALLOC_CONF - value: prof:true,lg_prof_interval:-1,lg_prof_sample:20,prof_prefix:/heap/ - - name: RW_HEAP_PROFILING_DIR - value: /heap + - mountPath: /var/lib/risingwave/data + name: risingwave-data + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + risingwave/component: meta resources: limits: cpu: 8 @@ -87,22 +80,24 @@ spec: memory: 32Gi compactor: nodeGroups: - - replicas: 1 - name: "" + - name: "" + replicas: 1 template: spec: volumes: - - name: heap - emptyDir: - sizeLimit: 1Gi + - name: risingwave-data + persistentVolumeClaim: + claimName: risingwave-data volumeMounts: - - mountPath: /heap - name: heap - env: - - name: MALLOC_CONF - value: prof:true,lg_prof_interval:-1,lg_prof_sample:20,prof_prefix:/heap/ - - name: RW_HEAP_PROFILING_DIR - value: /heap + - mountPath: /var/lib/risingwave/data + name: risingwave-data + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + risingwave/component: meta resources: limits: cpu: 4 From 3c3e10ab3c9cc4be8448e8983fba73b149ea5d92 Mon Sep 17 00:00:00 2001 From: vmaksimovski <12010235+vmaksimovski@users.noreply.github.com> Date: Mon, 9 Dec 2024 02:31:43 -0500 Subject: [PATCH 3/3] Update risingwave-sqlite-local-disk.yaml --- .../risingwave/risingwave-sqlite-local-disk.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml b/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml index 9fa2c024..84302080 100644 --- a/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml +++ b/docs/manifests/risingwave/risingwave-sqlite-local-disk.yaml @@ -1,7 +1,20 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: risingwave-data + labels: + app: risingwave +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi +--- apiVersion: risingwave.risingwavelabs.com/v1alpha1 kind: RisingWave metadata: - name: risingwave-sqlite-local-disk + name: risingwave spec: image: risingwavelabs/risingwave:v2.1.0 metaStore: