Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Add Redis data retention policy config options (#9080)

Scott Davidsone26f37351dfb
diff --git a/helm/templates/redis.yaml b/helm/templates/redis.yaml
index 8c94982e35..4bd37a19e3 100644
--- a/helm/templates/redis.yaml
+++ b/helm/templates/redis.yaml
@@ -64,6 +64,15 @@ spec:
{{- . | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.redis.persistence.enabled }}
+ {{- with .Values.redis.persistence.retentionPolicy }}
+ persistentVolumeClaimRetentionPolicy:
+ {{- with .whenDeleted }}
+ whenDeleted: {{ . }}
+ {{- end }}
+ {{- with .whenScaled }}
+ whenScaled: {{ . }}
+ {{- end }}
+ {{- end }}
volumeClaimTemplates:
- metadata:
name: redis-data
diff --git a/helm/values.yaml b/helm/values.yaml
index ded5bf5c1c..405bf82023 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -187,6 +187,11 @@ redis:
capacity: 5Gi
persistence:
enabled: true
+ # Set's the retention policy for the persistent storage (only available in k8s 1.32 or later)
+ # https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
+ # retentionPolicy:
+ # whenDeleted: Delete
+ # whenScaled: Delete
deployment:
strategy:
resources: