qbittorrent

This commit is contained in:
Michael Thomson
2023-12-19 15:17:44 -05:00
parent 1783a0a6b7
commit c18b630e72
9 changed files with 20 additions and 23 deletions

View File

@@ -0,0 +1,91 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: qbittorrent
namespace: media
spec:
selector:
matchLabels:
app: qbittorrent
template:
metadata:
labels:
app: qbittorrent
spec:
containers:
- name: qbittorrent
image: lscr.io/linuxserver/qbittorrent:latest
envFrom:
- configMapRef:
name: qbittorrent-config
optional: false
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 6881
name: udp
protocol: UDP
- containerPort: 6881
name: tcp
protocol: TCP
volumeMounts:
- name: qbittorrent-config
mountPath: /config
- mountPath: /data/downloads
name: data
subPath: downloads
- name: wireguard
image: lscr.io/linuxserver/wireguard:latest
envFrom:
- configMapRef:
name: wireguard-config
optional: false
securityContext:
capabilities:
add:
- NET_ADMIN
- SYS_MODULE
privileged: true
ports:
- containerPort: 51820
name: tun
protocol: UDP
lifecycle:
postStart:
exec:
command: ['cp', '/wireguard-secret/deluge.conf', '/config/wg_confs/wg0.conf']
volumeMounts:
- name: wireguard-config
mountPath: /config
- name: wireguard-secret
readOnly: true
mountPath: /wireguard-secret
initContainers:
- name: init-media-filesystem
image: busybox
command:
- /bin/sh
- -c
- |
mkdir -p -v /data/downloads/movies /data/downloads/tv /data/downloads/books /data/downloads/audiobooks /data/media/movies /data/media/tv /data/media/books /data/media/audiobooks
chown -R 1000:1000 /data
chmod -R a=,a+rX,u+w,g+w /data
volumeMounts:
- mountPath: /data
name: data
volumes:
- name: qbittorrent-config
persistentVolumeClaim:
claimName: qbittorrent-config
- name: wireguard-config
persistentVolumeClaim:
claimName: wireguard-config
- name: data
persistentVolumeClaim:
claimName: media-data
- name: wireguard-secret
secret:
secretName: wireguard-secret