From e51e4e34dc3057497d79823e998936292e16d7b2 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 22 Feb 2024 23:02:38 -0300 Subject: [PATCH] add config and books volumes --- charts/calibre-server/Chart.yaml | 2 +- .../calibre-server/templates/deployment.yaml | 5 +++++ .../templates/persistant-volume-claim.yaml | 20 +++++++++++++++++++ charts/calibre-server/values.yaml | 4 ++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 charts/calibre-server/templates/persistant-volume-claim.yaml diff --git a/charts/calibre-server/Chart.yaml b/charts/calibre-server/Chart.yaml index c3d2892..2dcde5b 100644 --- a/charts/calibre-server/Chart.yaml +++ b/charts/calibre-server/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: calibre-server -version: 0.0.3 +version: 0.0.4 description: Chart for Calibre content database keywords: - media diff --git a/charts/calibre-server/templates/deployment.yaml b/charts/calibre-server/templates/deployment.yaml index d4ec948..d0334b6 100644 --- a/charts/calibre-server/templates/deployment.yaml +++ b/charts/calibre-server/templates/deployment.yaml @@ -49,6 +49,8 @@ spec: {{- end }} volumeMounts: - mountPath: /config + name: calibre-server-config + - mountPath: /books name: calibre-server-books resources: {{- toYaml .Values.deployment.resources | nindent 12 }} @@ -74,6 +76,9 @@ spec: timeoutSeconds: 1 periodSeconds: 5 volumes: + - name: calibre-server-config + persistentVolumeClaim: + claimName: calibre-server-config - name: calibre-server-books persistentVolumeClaim: claimName: {{ .Values.persistence.books.claimName }} diff --git a/charts/calibre-server/templates/persistant-volume-claim.yaml b/charts/calibre-server/templates/persistant-volume-claim.yaml new file mode 100644 index 0000000..9b9f50a --- /dev/null +++ b/charts/calibre-server/templates/persistant-volume-claim.yaml @@ -0,0 +1,20 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: calibre-server-config + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: calibre-server + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} + app.kubernetes.io/managed-by: helm +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.persistence.config.storageSize }} + storageClassName: {{ .Values.persistence.config.storageClassName }} + volumeMode: {{ .Values.persistence.config.volumeMode }} diff --git a/charts/calibre-server/values.yaml b/charts/calibre-server/values.yaml index 79e1a92..f85311b 100644 --- a/charts/calibre-server/values.yaml +++ b/charts/calibre-server/values.yaml @@ -34,5 +34,9 @@ ingressRoute: outpost: authentik-proxy-outpost port: 9000 persistence: + config: + storageClassName: ceph-block + storageSize: 5Gi + volumeMode: Filesystem books: claimName: calibre-server-nfs-storage