* feat(helm): add persistent volume for local model cache When using local reranker (e.g., BAAI/bge-reranker-v2-m3) or local embedding models, the models are downloaded to /home/hindsight/.cache on every pod restart, causing slow startup and unnecessary bandwidth. Add optional persistent volume support: - api: PVC mounted at /home/hindsight/.cache - worker: volumeClaimTemplate (StatefulSet) at same path Disabled by default. Enable via: api.persistence.modelCache.enabled: true worker.persistence.modelCache.enabled: true Closes #860 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(helm): add extraVolumes and extraVolumeMounts for api and worker Allow users to mount arbitrary volumes (configMaps, secrets, emptyDir, etc.) into api and worker pods via values, following common helm chart library conventions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
722 B
YAML
21 lines
722 B
YAML
{{- if and .Values.api.enabled .Values.api.persistence.modelCache.enabled }}
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: {{ include "hindsight.fullname" . }}-api-model-cache
|
|
labels:
|
|
{{- include "hindsight.api.labels" . | nindent 4 }}
|
|
{{- with .Values.api.persistence.modelCache.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
accessModes:
|
|
{{- toYaml .Values.api.persistence.modelCache.accessModes | nindent 4 }}
|
|
{{- if .Values.api.persistence.modelCache.storageClass }}
|
|
storageClassName: {{ .Values.api.persistence.modelCache.storageClass }}
|
|
{{- end }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.api.persistence.modelCache.size }}
|
|
{{- end }}
|