From 44f5a93d46f4f6b19bb80cbbb19a4d54875943d9 Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Thu, 1 Jan 2026 17:56:09 +0100 Subject: [PATCH] migate clibre-web --- apps/charts/calibre-web/Chart.yaml | 4 ++ .../calibre-web/templates/deployment.yaml | 45 +------------------ apps/charts/calibre-web/templates/pvc.yaml | 12 +---- .../charts/calibre-web/templates/service.yaml | 16 +------ .../templates/virtual-service.yaml | 40 +---------------- apps/charts/calibre-web/values.yaml | 45 +++++++++++++++++++ 6 files changed, 53 insertions(+), 109 deletions(-) diff --git a/apps/charts/calibre-web/Chart.yaml b/apps/charts/calibre-web/Chart.yaml index 81961cb..482487f 100644 --- a/apps/charts/calibre-web/Chart.yaml +++ b/apps/charts/calibre-web/Chart.yaml @@ -1,3 +1,7 @@ apiVersion: v2 version: 1.0.0 name: calibre-web +dependencies: + - name: common + version: 1.0.0 + repository: file://../common diff --git a/apps/charts/calibre-web/templates/deployment.yaml b/apps/charts/calibre-web/templates/deployment.yaml index a215e6b..4508e33 100644 --- a/apps/charts/calibre-web/templates/deployment.yaml +++ b/apps/charts/calibre-web/templates/deployment.yaml @@ -1,44 +1 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ .Release.Name }}" - labels: - app: "{{ .Release.Name }}" -spec: - replicas: 1 - selector: - matchLabels: - app: "{{ .Release.Name }}" - template: - metadata: - labels: - app: "{{ .Release.Name }}" - spec: - containers: - - name: "{{ .Release.Name }}" - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: "{{ .Values.image.pullPolicy }}" - ports: - - containerPort: 8083 - name: http - env: - - name: TZ - value: "{{ .Values.globals.timezone }}" - - name: NETWORK_SHARE_MODE - value: "true" - - name: PUID - value: "1000" - - name: PGID - value: "1000" - volumeMounts: - - mountPath: /config - name: data - - mountPath: /calibre-library - name: books - volumes: - - name: data - persistentVolumeClaim: - claimName: "{{ .Release.Name }}-data" - - name: books - persistentVolumeClaim: - claimName: books +{{ include "common.deployment" . }} diff --git a/apps/charts/calibre-web/templates/pvc.yaml b/apps/charts/calibre-web/templates/pvc.yaml index bc1d0a6..379bad9 100644 --- a/apps/charts/calibre-web/templates/pvc.yaml +++ b/apps/charts/calibre-web/templates/pvc.yaml @@ -1,11 +1 @@ -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: '{{ .Release.Name }}-data' -spec: - accessModes: - - 'ReadWriteOnce' - resources: - requests: - storage: '1Gi' - storageClassName: '{{ .Values.globals.environment }}' +{{ include "common.pvc" . }} diff --git a/apps/charts/calibre-web/templates/service.yaml b/apps/charts/calibre-web/templates/service.yaml index 75b8c54..f024c64 100644 --- a/apps/charts/calibre-web/templates/service.yaml +++ b/apps/charts/calibre-web/templates/service.yaml @@ -1,15 +1 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ .Release.Name }}" - labels: - app: "{{ .Release.Name }}" -spec: - type: ClusterIP - ports: - - port: 80 - targetPort: 8083 - protocol: TCP - name: http - selector: - app: "{{ .Release.Name }}" +{{ include "common.service" . }} diff --git a/apps/charts/calibre-web/templates/virtual-service.yaml b/apps/charts/calibre-web/templates/virtual-service.yaml index 36e9d43..766f6b9 100644 --- a/apps/charts/calibre-web/templates/virtual-service.yaml +++ b/apps/charts/calibre-web/templates/virtual-service.yaml @@ -1,39 +1 @@ -apiVersion: networking.istio.io/v1 -kind: VirtualService -metadata: - name: "{{ .Release.Name }}-public" - namespace: "{{ .Release.Namespace }}" -spec: - gateways: - - "{{ .Values.globals.istio.gateways.public }}" - - mesh - hosts: - - "{{ .Values.subdomain }}.{{ .Values.globals.domain }}" - - mesh - http: - - route: - - destination: - host: "{{ .Release.Name }}" - port: - number: 80 - ---- -apiVersion: networking.istio.io/v1 -kind: VirtualService -metadata: - name: "{{ .Release.Name }}-private" - namespace: "{{ .Release.Namespace }}" -spec: - gateways: - - "{{ .Values.globals.istio.gateways.private }}" - - mesh - hosts: - - "{{ .Values.subdomain }}.{{ .Values.globals.domain }}" - - mesh - http: - - route: - - destination: - host: "{{ .Release.Name }}" - port: - number: 80 - +{{ include "common.virtualService" . }} diff --git a/apps/charts/calibre-web/values.yaml b/apps/charts/calibre-web/values.yaml index 34df6e1..b645960 100644 --- a/apps/charts/calibre-web/values.yaml +++ b/apps/charts/calibre-web/values.yaml @@ -2,4 +2,49 @@ image: repository: crocodilestick/calibre-web-automated tag: latest@sha256:577e846f104fd21453ef306eefb4a95dd95b3b9ddd2463a150944494284da0fd pullPolicy: IfNotPresent + subdomain: calibre-web + +# Deployment configuration +deployment: + strategy: Recreate + replicas: 1 + revisionHistoryLimit: 0 + +# Container configuration +container: + port: 8083 + healthProbe: + type: tcpSocket + +# Service configuration +service: + port: 80 + type: ClusterIP + +# Volume configuration +volumes: + - name: data + mountPath: /config + persistentVolumeClaim: data # Will be prefixed with release name + - name: books + mountPath: /calibre-library + persistentVolumeClaim: books # External PVC, used as-is + +# Persistent volume claims +persistentVolumeClaims: + - name: data + size: 1Gi + +# VirtualService configuration +virtualService: + enabled: true + gateways: + public: true + private: true + +# Environment variables +env: + NETWORK_SHARE_MODE: "true" + PUID: "1000" + PGID: "1000"