Add Redis data retention policy config options (#9080)

### What problem does this PR solve?

Adds configuration options to the RAGFlow Helm chart to set the Redis
data retention policies. By default this feature is disabled to maintain
support with older Kubernetes versions.

https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention

### Type of change

- [X] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Scott Davidson
2025-07-30 03:35:59 +01:00
committed by GitHub
parent 5c761174c2
commit e26f37351d
2 changed files with 14 additions and 0 deletions

View File

@ -64,6 +64,15 @@ spec:
{{- . | toYaml | nindent 12 }} {{- . | toYaml | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.redis.persistence.enabled }} {{- if .Values.redis.persistence.enabled }}
{{- with .Values.redis.persistence.retentionPolicy }}
persistentVolumeClaimRetentionPolicy:
{{- with .whenDeleted }}
whenDeleted: {{ . }}
{{- end }}
{{- with .whenScaled }}
whenScaled: {{ . }}
{{- end }}
{{- end }}
volumeClaimTemplates: volumeClaimTemplates:
- metadata: - metadata:
name: redis-data name: redis-data

View File

@ -187,6 +187,11 @@ redis:
capacity: 5Gi capacity: 5Gi
persistence: persistence:
enabled: true 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: deployment:
strategy: strategy:
resources: resources: