apiVersion: v1 kind: Service metadata: name: postgres labels: app: postgres spec: ports: - port: 5432 name: svc selector: app: postgres --- apiVersion: v1 kind: Secret metadata: name: postgres-credentials stringData: username: "postgres" password: "mysecretpassword" --- apiVersion: apps/v1 kind: StatefulSet metadata: labels: app: postgres name: postgres spec: replicas: 1 selector: matchLabels: app: postgres serviceName: postgres volumeClaimTemplates: - metadata: name: pg-data spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 10Gi persistentVolumeClaimRetentionPolicy: whenScaled: Retain whenDeleted: Delete template: metadata: labels: app: postgres spec: containers: - name: postgres image: postgres:17 imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /var/lib/postgresql name: pg-data env: - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: key: password name: postgres-credentials ports: - containerPort: 5432 name: svc protocol: TCP --- apiVersion: risingwave.risingwavelabs.com/v1alpha1 kind: RisingWave metadata: name: risingwave spec: image: risingwavelabs/risingwave:v2.7.0 metaStore: postgresql: host: postgres port: 5432 database: postgres credentials: secretName: postgres-credentials stateStore: dataDirectory: hummock001 s3: bucket: risingwave region: us-east-1 credentials: secretName: s3-credentials components: meta: 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: 1 memory: 2Gi requests: cpu: 1 memory: 2Gi 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 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