convert calibre-server to app-template

This commit is contained in:
2024-05-28 11:02:09 -05:00
parent df77ff1827
commit d291611dc8
6 changed files with 139 additions and 24 deletions

View File

@@ -1,11 +1,19 @@
apiVersion: v2
name: calibre-server
version: 1.0.0
description: Calibre Server
keywords:
- media
- books
sources:
- https://github.com/kovidgoyal/calibre
- https://github.com/alexlebens/helm-charts/tree/main/charts/calibre-server
- https://github.com/bjw-s/helm-charts/tree/main/charts/other/app-template
maintainers:
- name: alexlebens
dependencies:
- name: calibre-server
version: 0.0.8
repository: http://alexlebens.github.io/helm-charts
- name: app-template
alias: calibre-server
repository: https://bjw-s.github.io/helm-charts/
version: 3.2.1
icon: https://raw.githubusercontent.com/kovidgoyal/calibre/master/resources/images/lt.png
appVersion: 7.5.1

View File

@@ -0,0 +1,33 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: calibre-server
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 }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`calibre-server.alexlebens.net`)
middlewares:
- name: "authentik-{{ .Release.Name }}"
namespace: authentik
priority: 10
services:
- kind: Service
name: calibre-server-web
port: 8080
- kind: Rule
match: Host(`calibre-server.alexlebens.net`) && PathPrefix(`/outpost.goauthentik.io/`)
priority: 15
services:
- kind: Service
name: authentik-outpost-proxy
port: 9000
namespace: authentik

View File

@@ -0,0 +1,27 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: "authentik-{{ .Release.Name }}"
namespace: authentik
labels:
app.kubernetes.io/name: "authentik-{{ .Release.Name }}"
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: auth
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
forwardAuth:
address: http://authentik-outpost-proxy.authentik:9000/outpost.goauthentik.io/auth/traefik
trustForwardHeader: true
authResponseHeaders:
- X-authentik-username
- X-authentik-groups
- X-authentik-email
- X-authentik-name
- X-authentik-uid
- X-authentik-jwt
- X-authentik-meta-jwks
- X-authentik-meta-outpost
- X-authentik-meta-provider
- X-authentik-meta-app
- X-authentik-meta-version

View File

@@ -4,7 +4,7 @@ metadata:
name: calibre-server-nfs-storage
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/name: calibre-server-nfs-storage
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: storage

View File

@@ -4,7 +4,7 @@ metadata:
name: calibre-server-nfs-storage
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/name: calibre-server-nfs-storage
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: storage
@@ -17,8 +17,8 @@ spec:
accessModes:
- ReadWriteMany
nfs:
path: {{ index .Values "calibre-server" "persistence" "books" "nfs" "path" }}
server: {{ index .Values "calibre-server" "persistence" "books" "nfs" "server" }}
path: /volume2/Storage/Calibre
server: synologybond.alexlebens.net
mountOptions:
- vers=4
- minorversion=1

View File

@@ -1,20 +1,67 @@
calibre-server:
deployment:
env:
TZ: US/Central
ingressRoute:
enabled: true
http:
host: calibre-server.alexlebens.net
authentik:
outpost: authentik-outpost-proxy
namespace: authentik
controllers:
main:
type: deployment
replicas: 1
strategy: Recreate
revisionHistoryLimit: 3
containers:
main:
image:
repository: linuxserver/calibre
tag: v7.5.1-ls269
pullPolicy: IfNotPresent
env:
- name: PGID
value: "1001"
- name: PUID
value: "1001"
- name: TZ
value: US/Central
- name: UMASK_SET
value: "022"
- name: CUSTOM_USER
value: calibre
- name: TITLE
value: Calibre Server
- name: NO_DECOR
value: true
resources:
requests:
cpu: 100m
memory: 256Mi
serviceAccount:
create: true
service:
web:
controller: main
ports:
http:
port: 8080
targetPort: 8080
protocol: HTTP
content:
controller: main
ports:
http:
port: 8081
targetPort: 8081
protocol: HTTP
persistence:
config:
storageClassName: ceph-block
storageSize: 5Gi
storageClass: ceph-block
accessMode: ReadWriteOnce
size: 5Gi
retain: true
advancedMounts:
main:
main:
- path: /config
readOnly: false
books:
claimName: calibre-server-nfs-storage
nfs:
path: /volume2/Storage/Calibre
server: synologybond.alexlebens.net
existingClaim: calibre-server-nfs-storage
advancedMounts:
scanner:
main:
- path: /books
readOnly: true