Skip to content

Commit

Permalink
Merge pull request #13 from bat-bs/add-image-volume
Browse files Browse the repository at this point in the history
Add image volume
  • Loading branch information
hofq authored Mar 19, 2024
2 parents d2ca068 + 95e5f39 commit 3aabcaf
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/librechat/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.1.0
version: 1.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -28,7 +28,7 @@ home: https://blue-atlas.de

dependencies:
- name: mongodb
version: "14.13.0"
version: "15.0.2"
condition: mongodb.enabled
repository: "https://charts.bitnami.com/bitnami"
- name: meilisearch
Expand Down
13 changes: 11 additions & 2 deletions charts/librechat/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ spec:
template:
metadata:
annotations:
{{if .Values.librechat.configYamlContent }}checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}{{end}}
checksum/config: {{ include (print $.Template.BasePath "/configmap-env.yaml") . | sha256sum }}
{{ if .Values.librechat.configYamlContent }}checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}{{ end }}
checksum/configEnv: {{ include (print $.Template.BasePath "/configmap-env.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -52,6 +52,10 @@ spec:
subPath: "librechat.yaml"
readOnly: true
{{- end }}
{{- if .Values.librechat.imageVolume }}
- name: image-volume
mountPath: "/app/client/public/images"
{{- end }}
envFrom:
- configMapRef:
name: {{ include "librechat.fullname" $ }}-configenv
Expand All @@ -70,6 +74,11 @@ spec:
name: {{ include "librechat.fullname" $ }}-config
{{- end }}
{{- end }}
{{- if .Values.librechat.imageVolume }}
- name: image-volume
persistentVolumeClaim:
claimName: {{ include "librechat.fullname" $ }}-images
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
16 changes: 16 additions & 0 deletions charts/librechat/templates/persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.librechat.imageVolume }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "librechat.fullname" $ }}-images
spec:
accessModes:
- ReadWriteOnce
{{- if .Values.librechat.imageVolume.storageClassName }}
storageClassName: {{ .Values.librechat.imageVolume.storageClassName }}
{{- end }}
volumeMode: Filesystem
resources:
requests:
storage: {{ .Values.librechat.imageVolume.size }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/librechat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,18 @@ librechat:
# # name of existing Yaml configmap, key must be librechat.yaml
existingConfigYaml: ""

# Volume used to store image Files uploaded to the Web UI
imageVolume:
size: 10G

image:
repository: danny-avila/librechat
registry: ghcr.io
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""


imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down

0 comments on commit 3aabcaf

Please sign in to comment.