Kubernetes.K3s.installLog/services/PVR/deploy-Sonarr.yml

115 lines
2.4 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: sonarr
namespace: pvr
spec:
ports:
- protocol: TCP
name: web
port: 8989
selector:
app: sonarr
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sonarr
namespace: pvr
labels:
app: sonarr
spec:
replicas: 1
selector:
matchLabels:
app: sonarr
template:
metadata:
labels:
app: sonarr
spec:
containers:
- name: sonarr
image: linuxserver/sonarr:preview
ports:
- name: web
containerPort: 8989
volumeMounts:
- mountPath: /config
name: flexvolsmb-sonarr-config
- mountPath: /tv
name: flexvolsmb-pvr-series
- mountPath: /downloads
name: smb-pvr-volatile
subPath: downloads
volumes:
- name: flexvolsmb-sonarr-config
persistentVolumeClaim:
claimName: flexvolsmb-sonarr-config
- name: flexvolsmb-pvr-series
persistentVolumeClaim:
claimName: flexvolsmb-pvr-series
- name: smb-pvr-volatile
persistentVolumeClaim:
claimName: smb-pvr-volatile
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: sonarr
namespace: pvr
spec:
entryPoints:
- websecure
routes:
- match: Host(`series.pvr.spamasaurus.com`)
kind: Rule
services:
- name: sonarr
port: 8989
middlewares:
- name: 2fa-authentication@file
- name: security-headers@file
- name: compression@file
tls:
options:
name: defaults@file
certResolver: default
domains:
- main: '*.pvr.spamasaurus.com'
sans:
- 'pvr.spamasaurus.com'
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: flexvolsmb-sonarr-config
namespace: pvr
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-sonarr-config
flexVolume:
driver: mount/smb
secretRef:
name: smb-secret
options:
opts: domain=bessems.eu,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,iocharset=utf8
server: 192.168.11.225
share: /K3s.Volumes/sonarr/config
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flexvolsmb-sonarr-config
namespace: pvr
spec:
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-sonarr-config
resources:
requests:
storage: 1Gi