homelab/manifests/media/photoview.yaml

120 lines
2.7 KiB
YAML

# Apply: kubectl apply -f manifests/media/photoview.yaml
# Delete: kubectl delete -f manifests/media/photoview.yaml
# Description: Photoview deployment with Authentik forwardAuth at photoview.home.arpa.
apiVersion: v1
kind: Namespace
metadata:
name: photoview
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: photoview-db
namespace: photoview
annotations:
helm.sh/resource-policy: keep
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 2Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: photoview
namespace: photoview
spec:
replicas: 1
selector:
matchLabels:
app: photoview
template:
metadata:
labels:
app: photoview
spec:
containers:
- name: photoview
image: viktorstrate/photoview:2
ports:
- containerPort: 80
env:
- name: PHOTOVIEW_DATABASE_DRIVER
value: sqlite
- name: PHOTOVIEW_SQLITE_PATH
value: /db/photoview.db
- name: PHOTOVIEW_MEDIA_CACHE
value: /db/cache
- name: PHOTOVIEW_LISTEN_IP
value: "0.0.0.0"
- name: PHOTOVIEW_LISTEN_PORT
value: "80"
- name: PHOTOVIEW_DISABLE_VIDEO
value: "true"
volumeMounts:
- name: db
mountPath: /db
- name: photos-other
mountPath: /photos/other
readOnly: true
- name: photos-art
mountPath: /photos/art
readOnly: true
volumes:
- name: db
persistentVolumeClaim:
claimName: photoview-db
- name: photos-other
nfs:
server: 192.168.7.183
path: /mnt/storage/jellyfin/other
- name: photos-art
nfs:
server: 192.168.7.183
path: /mnt/storage/jellyfin/art
---
apiVersion: v1
kind: Service
metadata:
name: photoview
namespace: photoview
spec:
selector:
app: photoview
ports:
- port: 80
targetPort: 80
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: photoview-tls
namespace: photoview
spec:
secretName: photoview-tls
issuerRef:
name: internal-ca-issuer
kind: ClusterIssuer
dnsNames:
- photoview.home.arpa
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: photoview
namespace: photoview
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`photoview.home.arpa`)
services:
- name: photoview
namespace: photoview
port: 80
tls:
secretName: photoview-tls