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

118 lines
2.5 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: sabnzbd
namespace: pvr
spec:
ports:
- protocol: TCP
name: web
port: 8080
selector:
app: sabnzbd
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sabnzbd
namespace: pvr
labels:
app: sabnzbd
spec:
replicas: 1
selector:
matchLabels:
app: sabnzbd
template:
metadata:
labels:
app: sabnzbd
spec:
containers:
- name: sabnzbd
image: bv11-cr01.bessems.eu/proxy/linuxserver/sabnzbd
command: ["/bin/sh"]
args:
- -c
- "sed -e '/-server/c\ --config-file /config --server \":8080\"' -i /etc/services.d/sabnzbd/run;/init"
ports:
- name: web
containerPort: 8080
volumeMounts:
- mountPath: /config/sabnzbd.ini
subPath: sabnzbd.ini
name: flexvolsmb-sabnzbd-config
- mountPath: /downloads
subPath: downloads
name: smb-pvr-volatile
- mountPath: /incomplete-downloads
subPath: incomplete-downloads
name: smb-pvr-volatile
volumes:
- name: flexvolsmb-sabnzbd-config
persistentVolumeClaim:
claimName: flexvolsmb-sabnzbd-config
- name: smb-pvr-volatile
persistentVolumeClaim:
claimName: smb-pvr-volatile
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: sabnzbd
namespace: pvr
spec:
entryPoints:
- websecure
routes:
- match: Host(`download.pvr.spamasaurus.com`)
kind: Rule
services:
- name: sabnzbd
port: 8080
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-sabnzbd-config
namespace: pvr
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-sabnzbd-config
flexVolume:
driver: mount/smb
secretRef:
name: smb-secret
options:
opts: domain=bessems.eu,file_mode=0777,dir_mode=0777,uid=911,gid=911,iocharset=utf8
server: 192.168.11.225
share: /K3s.Volumes/sabnzbd/config
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flexvolsmb-sabnzbd-config
namespace: pvr
spec:
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-sabnzbd-config
resources:
requests:
storage: 1Gi