Add Photoview and the corresponding address in Pihole

This commit is contained in:
Nik Afiq 2026-03-17 21:52:48 +09:00
parent 6a665449d7
commit e49ea43596
2 changed files with 122 additions and 1 deletions

View File

@ -0,0 +1,120 @@
# 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

View File

@ -76,3 +76,4 @@ dnsmasq:
- address=/ca.home.arpa/192.168.7.77
- address=/auth.home.arpa/192.168.7.77
- address=/traefik.home.arpa/192.168.7.77
- address=/photoview.home.arpa/192.168.7.77