1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-11-15 12:00:33 +01:00
LibreTranslate/chart/templates/pvc.yaml
Dominick Rivard ae7af14660 Add Helm Chart for LibreTranslate Deployment
Introduce a Helm chart to streamline the deployment and management of LibreTranslate within a Kubernetes cluster. The chart includes configurable parameters, persistent storage support, authentication, scalability features, health checks, and detailed documentation. See the PR for complete details.
2023-08-11 02:38:12 -04:00

37 lines
1.1 KiB
YAML

{{- if and .Values.persistence.enabled (eq .Values.persistence.db.accessMode "ReadWriteMany") }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: db-volume
labels:
app.kubernetes.io/name: {{ include "libretranslate.name" . }}-pv
spec:
accessModes:
- {{ .Values.persistence.db.accessMode }}
resources:
requests:
storage: {{ .Values.persistence.db.size }}
{{- if .Values.persistence.db.storageClass }}
storageClassName: {{ .Values.persistence.db.storageClass | quote }}
{{- end }}
{{- end }}
{{- if and .Values.persistence.enabled (eq .Values.persistence.models.accessMode "ReadWriteMany") }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: models-volume
labels:
app.kubernetes.io/name: {{ include "libretranslate.name" . }}-pvc
spec:
accessModes:
- {{ .Values.persistence.models.accessMode }}
resources:
requests:
storage: {{ .Values.persistence.models.size }}
{{- if .Values.persistence.models.storageClass }}
storageClassName: {{ .Values.persistence.models.storageClass | quote }}
{{- end }}
{{- end }}