From 14e4adc4c8d6d384661e6c3246d8bd752b201401 Mon Sep 17 00:00:00 2001 From: jklein Date: Thu, 19 Feb 2026 14:41:44 +0100 Subject: [PATCH] feat(charts): added calibre-web-automated --- calibre-web-automated/.helmignore | 23 +++++ calibre-web-automated/Chart.yaml | 24 ++++++ .../calibre-web-automated-consume.pvc.yaml | 11 +++ .../calibre-web-automated.ingress.yaml | 25 ++++++ .../templates/calibre-web-automated.pvc.yaml | 11 +++ .../calibre-web-automated.secret.yaml | 6 ++ .../calibre-web-automated.service.yaml | 13 +++ .../templates/calibre-web-automated.sfs.yaml | 84 +++++++++++++++++++ calibre-web-automated/values.yaml | 20 +++++ 9 files changed, 217 insertions(+) create mode 100644 calibre-web-automated/.helmignore create mode 100644 calibre-web-automated/Chart.yaml create mode 100644 calibre-web-automated/templates/calibre-web-automated-consume.pvc.yaml create mode 100644 calibre-web-automated/templates/calibre-web-automated.ingress.yaml create mode 100644 calibre-web-automated/templates/calibre-web-automated.pvc.yaml create mode 100644 calibre-web-automated/templates/calibre-web-automated.secret.yaml create mode 100644 calibre-web-automated/templates/calibre-web-automated.service.yaml create mode 100644 calibre-web-automated/templates/calibre-web-automated.sfs.yaml create mode 100644 calibre-web-automated/values.yaml diff --git a/calibre-web-automated/.helmignore b/calibre-web-automated/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/calibre-web-automated/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/calibre-web-automated/Chart.yaml b/calibre-web-automated/Chart.yaml new file mode 100644 index 0000000..37f061f --- /dev/null +++ b/calibre-web-automated/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: calibre-web-automated +description: A Helm chart for calibere-web-automated + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +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.2.0-release-v4-0-6 + +# 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 +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: v4.0.6 diff --git a/calibre-web-automated/templates/calibre-web-automated-consume.pvc.yaml b/calibre-web-automated/templates/calibre-web-automated-consume.pvc.yaml new file mode 100644 index 0000000..f773aa7 --- /dev/null +++ b/calibre-web-automated/templates/calibre-web-automated-consume.pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-consume-pvc +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Gi + storageClassName: longhorn \ No newline at end of file diff --git a/calibre-web-automated/templates/calibre-web-automated.ingress.yaml b/calibre-web-automated/templates/calibre-web-automated.ingress.yaml new file mode 100644 index 0000000..ed54cd8 --- /dev/null +++ b/calibre-web-automated/templates/calibre-web-automated.ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-ingress + annotations: + cert-manager.io/cluster-issuer: {{ required "A Cluster-Issuer must be provided" .Values.ingress.clusterIssuer}} + nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.cwa.maxUploadFileSize }} + nginx.org/client-max-body-size: {{ .Values.cwa.maxUploadFileSize }} +spec: + ingressClassName: nginx + rules: + - host: {{ required "A Domain/Host must be provided" .Values.ingress.domain }} + http: + paths: + - backend: + service: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-service + port: + name: http + path: / + pathType: Prefix + tls: + - hosts: + - {{ required "A Domain/Host must be provided" .Values.ingress.domain }} + secretName: tls-{{ .Chart.Name }}-{{ .Release.Name }}-ingress diff --git a/calibre-web-automated/templates/calibre-web-automated.pvc.yaml b/calibre-web-automated/templates/calibre-web-automated.pvc.yaml new file mode 100644 index 0000000..4d399a5 --- /dev/null +++ b/calibre-web-automated/templates/calibre-web-automated.pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.cwa.storage }} + storageClassName: longhorn diff --git a/calibre-web-automated/templates/calibre-web-automated.secret.yaml b/calibre-web-automated/templates/calibre-web-automated.secret.yaml new file mode 100644 index 0000000..7717d3a --- /dev/null +++ b/calibre-web-automated/templates/calibre-web-automated.secret.yaml @@ -0,0 +1,6 @@ +apiVersion: onepassword.com/v1 +kind: OnePasswordItem +metadata: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-secret +spec: + itemPath: {{ .Values.secrets.cwaSecretRef }} diff --git a/calibre-web-automated/templates/calibre-web-automated.service.yaml b/calibre-web-automated/templates/calibre-web-automated.service.yaml new file mode 100644 index 0000000..8d22239 --- /dev/null +++ b/calibre-web-automated/templates/calibre-web-automated.service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-service +spec: + selector: + app: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-sfs + ports: + - protocol: TCP + port: 80 + targetPort: http + name: http + type: ClusterIP diff --git a/calibre-web-automated/templates/calibre-web-automated.sfs.yaml b/calibre-web-automated/templates/calibre-web-automated.sfs.yaml new file mode 100644 index 0000000..d815230 --- /dev/null +++ b/calibre-web-automated/templates/calibre-web-automated.sfs.yaml @@ -0,0 +1,84 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-sfs + labels: + app: {{ .Chart.Name }}-{{ .Release.Name }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-sfs + template: + metadata: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-sfs + labels: + app: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-sfs + spec: + containers: + - name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-container + image: "ghcr.io/crocodilestick/calibre-web-automated:{{ .Chart.AppVersion }}" + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8083 + name: http + protocol: TCP + env: + - name: TZ + value: "{{ .Values.cwa.timezone }}" + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: HARDCOVER_TOKEN + valueFrom: + secretKeyRef: + name: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-secret + key: hardcover-api-token + - name: CALIBRE_CONFIG_DIR + value: "/config/.config/calibre" + - name: NETWORK_SHARE_MODE + value: "false" + volumeMounts: + - mountPath: "/config" + name: cwa + subPath: config/ + - mountPath: "/calibre-library" + name: cwa + subPath: calibre-library/ + - mountPath: "/config/.config/calibre/plugins" + name: cwa + subPath: calibre-plugins/ + - mountPath: "/config/.config/calibre/customize.py.json" + name: cwa-plugins-config + subPath: customize.py.json + - mountPath: "/cwa-book-ingest" + name: cwa-consume + resources: + requests: + memory: "{{ .Values.cwa.resources.requests.memory }}" + cpu: "{{ .Values.cwa.resources.requests.cpu }}" + ephemeral-storage: "{{ .Values.cwa.resources.requests.ephemeralStorage }}" + limits: + memory: "{{ .Values.cwa.resources.limits.memory }}" + cpu: "{{ .Values.cwa.resources.limits.cpu }}" + ephemeral-storage: "{{ .Values.cwa.resources.limits.ephemeralStorage }}" + automountServiceAccountToken: false + securityContext: + fsGroup: 1000 + fsGroupChangePolicy: Always + restartPolicy: Always + volumes: + - name: cwa + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-pvc + - name: cwa-consume + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-consume-pvc + - name: cwa-plugins-config + secret: + secretName: {{ .Chart.Name }}-{{ .Release.Name }}-cwa-secret + items: + - key: calibre-plugins + path: customize.py.json + mode: 0644 \ No newline at end of file diff --git a/calibre-web-automated/values.yaml b/calibre-web-automated/values.yaml new file mode 100644 index 0000000..c80562d --- /dev/null +++ b/calibre-web-automated/values.yaml @@ -0,0 +1,20 @@ +secrets: + cwaSecretRef: null + +cwa: + storage: 10Gi + timezone: "UTC" + maxUploadFileSize: "10m" + resources: + requests: + cpu: 0.1 + memory: 512Mi + ephemeralStorage: 100Mi + limits: + cpu: 1 + memory: 1024Mi + ephemeralStorage: 200Mi + +ingress: + clusterIssuer: "letsencrypt-issuer" + domain: null \ No newline at end of file