diff --git a/README.md b/README.md index f09aca8..a399c0f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ -# local.realm.audiobookshelf +# audiobookshelf on kubernetes +## Installation +Just apply the files in order: +- namespace.yaml +- pvc.yaml +- deployment.yaml +- service.yaml diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..57dc629 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,50 @@ +# deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: audiobookshelf + namespace: audiobookshelf + labels: + app: audiobookshelf +spec: + replicas: 1 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + selector: + matchLabels: + app: audiobookshelf + template: + metadata: + labels: + app: audiobookshelf + spec: + containers: + - name: audiobookshelf + env: + - name: TZ + value: Europe/Berlin + image: ghcr.io/advplyr/audiobookshelf:2.30.0 + volumeMounts: + - name: config + mountPath: /config + - name: metadata + mountPath: /metadata + - name: podcasts + mountPath: /podcasts + - name: audiobooks + mountPath: /audiobooks + volumes: + - name: config + persistentVolumeClaim: + claimName: audiobookshelf-config + - name: metadata + persistentVolumeClaim: + claimName: audiobookshelf-metadata + - name: audiobooks + persistentVolumeClaim: + claimName: audiobookshelf-audiobooks + - name: podcasts + persistentVolumeClaim: + claimName: audiobookshelf-podcasts diff --git a/namespace.yaml b/namespace.yaml new file mode 100644 index 0000000..333a6ba --- /dev/null +++ b/namespace.yaml @@ -0,0 +1,5 @@ +# namespace.yaml +kind: Namespace +apiVersion: v1 +metadata: + name: audiobookshelf diff --git a/pvc.yaml b/pvc.yaml new file mode 100644 index 0000000..7d00361 --- /dev/null +++ b/pvc.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: audiobookshelf-podcasts + namespace: audiobookshelf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Ti + storageClassName: nfs-csi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: audiobookshelf-audiobooks + namespace: audiobookshelf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 512Gi + storageClassName: nfs-csi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: audiobookshelf-config + namespace: audiobookshelf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 128Mi + storageClassName: nfs-csi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: audiobookshelf-metadata + namespace: audiobookshelf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 512Mi + storageClassName: nfs-csi diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..860d307 --- /dev/null +++ b/service.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + name: audiobookshelf + namespace: audiobookshelf +spec: + ports: + - name: http + port: 80 + protocol: TCP + selector: + app: audiobookshelf + sessionAffinity: None + type: LoadBalancer